diff options
Diffstat (limited to 'env/eeprom.c')
-rw-r--r-- | env/eeprom.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/env/eeprom.c b/env/eeprom.c index ac2689cc14..cb04d2ac88 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -9,7 +9,8 @@ #include <common.h> #include <command.h> -#include <environment.h> +#include <env.h> +#include <env_internal.h> #include <linux/stddef.h> #if defined(CONFIG_I2C_ENV_EEPROM_BUS) #include <i2c.h> @@ -131,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; @@ -193,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); @@ -206,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, |