diff options
Diffstat (limited to 'common/env_onenand.c')
-rw-r--r-- | common/env_onenand.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/common/env_onenand.c b/common/env_onenand.c index d5c907c..dbccc79 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -22,9 +22,6 @@ */ #include <common.h> - -#if defined(CFG_ENV_IS_IN_ONENAND) /* Environment is in OneNAND */ - #include <command.h> #include <environment.h> #include <linux/stddef.h> @@ -65,7 +62,7 @@ void env_relocate_spec(void) int use_default = 0; size_t retlen; - env_addr = CFG_ENV_ADDR; + env_addr = CONFIG_ENV_ADDR; /* Check OneNAND exist */ if (onenand_mtd.writesize) @@ -92,14 +89,15 @@ void env_relocate_spec(void) int saveenv(void) { - unsigned long env_addr = CFG_ENV_ADDR; + unsigned long env_addr = CONFIG_ENV_ADDR; struct erase_info instr = { .callback = NULL, }; size_t retlen; - instr.len = CFG_ENV_SIZE; + instr.len = CONFIG_ENV_SIZE; instr.addr = env_addr; + instr.mtd = &onenand_mtd; if (onenand_erase(&onenand_mtd, &instr)) { printf("OneNAND: erase failed at 0x%08lx\n", env_addr); return 1; @@ -126,5 +124,3 @@ int env_init(void) return 0; } - -#endif /* CFG_ENV_IS_IN_ONENAND */ |