diff options
author | Marek Vasut | 2018-04-17 01:07:23 +0200 |
---|---|---|
committer | Marek Vasut | 2018-04-17 11:38:56 +0200 |
commit | a3c159b9c3cb844a8f0bb3abdac93b0fcaccba54 (patch) | |
tree | 72e1ab2ba7b1f33623bfd13d5dd5a719c6a94492 /board/renesas/stout | |
parent | 1a6e8dda490015667e6b9a5246588d7ed19a4469 (diff) |
ARM: rmobile: Ignore U-Boot env when started via JTAG on Stout
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>
Diffstat (limited to 'board/renesas/stout')
-rw-r--r-- | board/renesas/stout/stout.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/board/renesas/stout/stout.c b/board/renesas/stout/stout.c index d7e81292a0e..192ee66a382 100644 --- a/board/renesas/stout/stout.c +++ b/board/renesas/stout/stout.c @@ -128,3 +128,18 @@ int board_phy_config(struct phy_device *phydev) const struct rmobile_sysinfo sysinfo = { CONFIG_ARCH_RMOBILE_BOARD_STRING }; + +enum env_location env_get_location(enum env_operation op, int prio) +{ + const u32 load_magic = 0xb33fc0de; + + /* Block environment access if loaded using JTAG */ + if ((readl(CONFIG_SPL_TEXT_BASE + 0x24) == load_magic) && + (op != ENVOP_INIT)) + return ENVL_UNKNOWN; + + if (prio) + return ENVL_UNKNOWN; + + return ENVL_SPI_FLASH; +} |