summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Thouret <guy.thouret@wems.co.uk>2016-03-11 13:31:39 +0000
committerTom Rini <trini@konsulko.com>2016-04-11 12:44:37 -0400
commitc00c29d8f70533b8b59e48be207027e58c735d2b (patch)
treec7727a7f8ee2e6d7bb863cadcda807747e632f64
parentd3bafe32ca47bc3872837c1fe7874f9913de103f (diff)
downloadu-boot-c00c29d8f70533b8b59e48be207027e58c735d2b.tar.gz
u-boot-c00c29d8f70533b8b59e48be207027e58c735d2b.tar.xz
u-boot-c00c29d8f70533b8b59e48be207027e58c735d2b.zip
env_eeprom invalidates gd->env_addr by setting it to an offset value
Patch to fix boot hang when using env on i2c eeprom caused by invalid gd->env_addr Signed-off-by: Guy Thouret <guy.thouret@wems.co.uk> Cc: Heiko Schocher <hs@denx.de>
-rw-r--r--common/env_eeprom.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 72b13734f2..5f63a6cd4a 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -145,11 +145,6 @@ void env_relocate_spec(void)
gd->env_valid = 1;
}
- if (gd->env_valid == 2)
- gd->env_addr = off_env[1] + offsetof(env_t, data);
- else if (gd->env_valid == 1)
- gd->env_addr = off_env[0] + offsetof(env_t, data);
-
#else /* CONFIG_ENV_OFFSET_REDUND */
ulong crc, len, new;
uchar rdbuf[64];
@@ -175,10 +170,8 @@ void env_relocate_spec(void)
}
if (crc == new) {
- gd->env_addr = offsetof(env_t, data);
gd->env_valid = 1;
} else {
- gd->env_addr = 0;
gd->env_valid = 0;
}
#endif /* CONFIG_ENV_OFFSET_REDUND */