Message ID | 20180416204452.10906-2-marek.vasut+renesas@gmail.com |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show |
Series | [U-Boot,1/3] common: Let board decide if env should be loaded | expand |
diff --git a/board/renesas/porter/porter.c b/board/renesas/porter/porter.c index acd4f91d59..052e1abe08 100644 --- a/board/renesas/porter/porter.c +++ b/board/renesas/porter/porter.c @@ -136,3 +136,13 @@ void reset_cpu(ulong addr) if (ret) hang(); } + +int board_should_load_env(void) +{ + const u32 load_magic = 0xb33fc0de; + + if (readl(CONFIG_SPL_TEXT_BASE + 0x24) == load_magic) + return 0; + + return -EAGAIN; +}
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 <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Tom Rini <trini@konsulko.com> --- board/renesas/porter/porter.c | 10 ++++++++++ 1 file changed, 10 insertions(+)