diff options
author | Markus Klotzbuecher <mk@denx.de> | 2006-03-08 00:04:04 +0100 |
---|---|---|
committer | Markus Klotzbücher <mk@pollux.denx.de> | 2006-03-08 00:04:04 +0100 |
commit | 3c4eb0880b5ea7c928e9abed943b3b0e0abf2de6 (patch) | |
tree | ceb4bab688295dc9eae5ee32a3452cf8435a7e00 /common | |
parent | 9c575e51dec11f304bfdc8bcc3aada7af79823b1 (diff) | |
download | u-boot-imx-3c4eb0880b5ea7c928e9abed943b3b0e0abf2de6.zip u-boot-imx-3c4eb0880b5ea7c928e9abed943b3b0e0abf2de6.tar.gz u-boot-imx-3c4eb0880b5ea7c928e9abed943b3b0e0abf2de6.tar.bz2 |
Some minor fixes to environment in NAND code.
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_nvedit.c | 8 | ||||
-rw-r--r-- | common/env_nand.c | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 1babffe..ecf1db4 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -532,7 +532,9 @@ int getenv_r (char *name, char *buf, unsigned len) #if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \ ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == \ - (CFG_CMD_ENV|CFG_CMD_FLASH)) + (CFG_CMD_ENV|CFG_CMD_FLASH)) || \ + ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_NAND)) == \ + (CFG_CMD_ENV|CFG_CMD_NAND)) int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { extern char * env_name_spec; @@ -588,7 +590,9 @@ U_BOOT_CMD( #if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \ ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == \ - (CFG_CMD_ENV|CFG_CMD_FLASH)) + (CFG_CMD_ENV|CFG_CMD_FLASH)) || \ + ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_NAND)) == \ + (CFG_CMD_ENV|CFG_CMD_NAND)) U_BOOT_CMD( saveenv, 1, 0, do_saveenv, "saveenv - save environment variables to persistent storage\n", diff --git a/common/env_nand.c b/common/env_nand.c index 4896853..4ae68c5 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -115,7 +115,7 @@ int saveenv(void) int total, ret = 0; puts ("Erasing Nand..."); - if (nand_erase(&nand_info[0], CFG_NEW_OFFSET, CFG_ENV_SIZE)) + if (nand_erase(&nand_info[0], CFG_ENV_OFFSET, CFG_ENV_SIZE)) return 1; puts ("Writing to Nand... "); |