From: Marek Vasut Date: Mon, 16 Apr 2018 22:44:52 +0200 Subject: [U-Boot] [PATCH 3/3] ARM: rmobile: Ignore U-Boot env when started via JTAG on Stout In-Reply-To: <20180416204452.10906-1-marek.vasut+renesas@gmail.com> References: <20180416204452.10906-1-marek.vasut+renesas@gmail.com> Message-ID: <20180416204452.10906-3-marek.vasut+renesas@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When U-Boot is started via JTAG, ignore the installed environment as it may interfere with the recovery of the board. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu Cc: Tom Rini --- board/renesas/stout/stout.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c index d7e81292a0..16f4837502 100644 --- a/board/renesas/stout/stout.c +++ b/board/renesas/stout/stout.c @@ -128,3 +128,13 @@ int board_phy_config(struct phy_device *phydev) const struct rmobile_sysinfo sysinfo = { CONFIG_ARCH_RMOBILE_BOARD_STRING }; + +int board_should_load_env(void) +{ + const u32 load_magic = 0xb33fc0de; + + if (readl(CONFIG_SPL_TEXT_BASE + 0x24) == load_magic) + return 0; + + return -EAGAIN; +} -- 2.16.2