diff options
Diffstat (limited to 'env/eeprom.c')
-rw-r--r-- | env/eeprom.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/env/eeprom.c b/env/eeprom.c index 8d82cf892c..91ee3f35eb 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -132,9 +132,11 @@ static int env_eeprom_load(void) gd->env_valid = ENV_REDUND; } else { /* both ok - check serial */ - if (flags[0] == ACTIVE_FLAG && flags[1] == OBSOLETE_FLAG) + if (flags[0] == ENV_REDUND_ACTIVE && + flags[1] == ENV_REDUND_OBSOLETE) gd->env_valid = ENV_VALID; - else if (flags[0] == OBSOLETE_FLAG && flags[1] == ACTIVE_FLAG) + else if (flags[0] == ENV_REDUND_OBSOLETE && + flags[1] == ENV_REDUND_ACTIVE) gd->env_valid = ENV_REDUND; else if (flags[0] == 0xFF && flags[1] == 0) gd->env_valid = ENV_REDUND; @@ -194,7 +196,7 @@ static int env_eeprom_save(void) unsigned int off = CONFIG_ENV_OFFSET; #ifdef CONFIG_ENV_OFFSET_REDUND unsigned int off_red = CONFIG_ENV_OFFSET_REDUND; - char flag_obsolete = OBSOLETE_FLAG; + char flag_obsolete = ENV_REDUND_OBSOLETE; #endif rc = env_export(&env_new); @@ -207,7 +209,7 @@ static int env_eeprom_save(void) off_red = CONFIG_ENV_OFFSET; } - env_new.flags = ACTIVE_FLAG; + env_new.flags = ENV_REDUND_ACTIVE; #endif rc = eeprom_bus_write(CONFIG_SYS_DEF_EEPROM_ADDR, |