/*
* (C) Copyright 2000-2010
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* Andreas Heppel <aheppel@sysgo.de>
/*
* (C) Copyright 2000-2010
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* Andreas Heppel <aheppel@sysgo.de>
} else if (crc_ok[0] && !crc_ok[1]) {
gd->env_valid = ENV_VALID;
} else if (!crc_ok[0] && crc_ok[1]) {
gd->env_valid = ENV_REDUND;
} else {
/* both ok - check serial */
} else if (crc_ok[0] && !crc_ok[1]) {
gd->env_valid = ENV_VALID;
} else if (!crc_ok[0] && crc_ok[1]) {
gd->env_valid = ENV_REDUND;
} else {
/* both ok - check serial */
gd->env_valid = ENV_REDUND;
else if (flags[0] == 0xFF && flags[1] == 0)
gd->env_valid = ENV_REDUND;
gd->env_valid = ENV_REDUND;
else if (flags[0] == 0xFF && flags[1] == 0)
gd->env_valid = ENV_REDUND;
eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR,
off, (uchar *)buf_env, CONFIG_ENV_SIZE);
eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR,
off, (uchar *)buf_env, CONFIG_ENV_SIZE);
unsigned int off = CONFIG_ENV_OFFSET;
#ifdef CONFIG_ENV_OFFSET_REDUND
unsigned int off_red = CONFIG_ENV_OFFSET_REDUND;
unsigned int off = CONFIG_ENV_OFFSET;
#ifdef CONFIG_ENV_OFFSET_REDUND
unsigned int off_red = CONFIG_ENV_OFFSET_REDUND;