All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] ARM: socfpga: Disable bridges in SPL unless booting from FPGA
Date: Wed, 17 Apr 2019 22:15:27 +0200	[thread overview]
Message-ID: <20190417201529.23953-2-marex@denx.de> (raw)
In-Reply-To: <20190417201529.23953-1-marex@denx.de>

Disable bridges between L3 Main switch and FPGA unless booting
from FPGA and keep them disabled to prevent glitches and possible
hangs of the L3 Main switch.

The current version of the code could have enabled the bridges
between the L3 Main switch and FPGA for a short period of time
in board_init_f() in case the FPGA was programmed and then again
disable them at the end of board_init_f(). Replace this with a
code which only sets up the handoff registers and let the user
enable the bridges later on.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
---
 arch/arm/mach-socfpga/spl_gen5.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/mach-socfpga/spl_gen5.c b/arch/arm/mach-socfpga/spl_gen5.c
index 45382b549a..aa88f2cf3e 100644
--- a/arch/arm/mach-socfpga/spl_gen5.c
+++ b/arch/arm/mach-socfpga/spl_gen5.c
@@ -188,7 +188,7 @@ void board_init_f(ulong dummy)
 
 	/* De-assert reset for peripherals and bridges based on handoff */
 	reset_deassert_peripherals_handoff();
-	socfpga_bridges_reset(0);
+	socfpga_bridges_set_handoff_regs(true, true, true);
 
 	debug("Unfreezing/Thaw all I/O banks\n");
 	/* unfreeze / thaw all IO banks */
@@ -228,7 +228,4 @@ void board_init_f(ulong dummy)
 		puts("SDRAM size check failed!\n");
 		hang();
 	}
-
-	if (!socfpga_is_booting_from_fpga())
-		socfpga_bridges_reset(1);
 }
-- 
2.20.1

  reply	other threads:[~2019-04-17 20:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 20:15 [U-Boot] [PATCH 1/4] ARM: socfpga: Factor out handoff register configuration Marek Vasut
2019-04-17 20:15 ` Marek Vasut [this message]
2019-04-19 19:53   ` [U-Boot] [PATCH 2/4] ARM: socfpga: Disable bridges in SPL unless booting from FPGA Simon Goldschmidt
2019-04-17 20:15 ` [U-Boot] [PATCH 3/4] ARM: socfpga: Fully unmap the FPGA bridges from L3 space Marek Vasut
2019-04-19 19:54   ` Simon Goldschmidt
2019-04-17 20:15 ` [U-Boot] [PATCH 4/4] ARM: socfpga: Add support for selecting bridges in bridge command Marek Vasut
2019-04-19 20:00   ` Simon Goldschmidt
2019-04-22 18:01     ` Marek Vasut
2019-04-22 18:22       ` Simon Goldschmidt
2019-04-22 18:41         ` Marek Vasut
2019-04-22 19:18           ` Simon Goldschmidt
2019-04-22 19:24             ` Marek Vasut
2019-04-26  6:36               ` Simon Goldschmidt
2019-04-29  8:35                 ` Marek Vasut
2019-04-19 19:47 ` [U-Boot] [PATCH 1/4] ARM: socfpga: Factor out handoff register configuration Simon Goldschmidt
2019-04-22 17:59   ` Marek Vasut
2019-04-22 18:17     ` Simon Goldschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190417201529.23953-2-marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.