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>
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];
}
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 */