summaryrefslogtreecommitdiff
path: root/common/env_eeprom.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-09-12 16:13:12 +0200
committerWolfgang Denk <wd@denx.de>2008-09-12 16:13:12 +0200
commitafbc526336447a7357e9c82852df0377d09a8089 (patch)
tree63360d749d3f02916a1239b3862c68d41d3f3d19 /common/env_eeprom.c
parentb476b032562aae5a09985f7e22232a5ee7042746 (diff)
parentdeeec4991a55de243787002ede24d2331d234fc8 (diff)
downloadu-boot-imx-afbc526336447a7357e9c82852df0377d09a8089.zip
u-boot-imx-afbc526336447a7357e9c82852df0377d09a8089.tar.gz
u-boot-imx-afbc526336447a7357e9c82852df0377d09a8089.tar.bz2
Merge branch 'Makefile-next' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'common/env_eeprom.c')
-rw-r--r--common/env_eeprom.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/common/env_eeprom.c b/common/env_eeprom.c
index 9e1a201..1f0f413 100644
--- a/common/env_eeprom.c
+++ b/common/env_eeprom.c
@@ -25,9 +25,6 @@
*/
#include <common.h>
-
-#if defined(CFG_ENV_IS_IN_EEPROM) /* Environment is in EEPROM */
-
#include <command.h>
#include <environment.h>
#include <linux/stddef.h>
@@ -43,7 +40,7 @@ uchar env_get_char_spec (int index)
uchar c;
eeprom_read (CFG_DEF_EEPROM_ADDR,
- CFG_ENV_OFFSET+index+offsetof(env_t,data),
+ CONFIG_ENV_OFFSET+index+offsetof(env_t,data),
&c, 1);
return (c);
@@ -52,17 +49,17 @@ uchar env_get_char_spec (int index)
void env_relocate_spec (void)
{
eeprom_read (CFG_DEF_EEPROM_ADDR,
- CFG_ENV_OFFSET,
+ CONFIG_ENV_OFFSET,
(uchar*)env_ptr,
- CFG_ENV_SIZE);
+ CONFIG_ENV_SIZE);
}
int saveenv(void)
{
return eeprom_write (CFG_DEF_EEPROM_ADDR,
- CFG_ENV_OFFSET,
+ CONFIG_ENV_OFFSET,
(uchar *)env_ptr,
- CFG_ENV_SIZE);
+ CONFIG_ENV_SIZE);
}
/************************************************************************
@@ -81,7 +78,7 @@ int env_init(void)
/* read old CRC */
eeprom_read (CFG_DEF_EEPROM_ADDR,
- CFG_ENV_OFFSET+offsetof(env_t,crc),
+ CONFIG_ENV_OFFSET+offsetof(env_t,crc),
(uchar *)&crc, sizeof(ulong));
new = 0;
@@ -90,7 +87,7 @@ int env_init(void)
while (len > 0) {
int n = (len > sizeof(buf)) ? sizeof(buf) : len;
- eeprom_read (CFG_DEF_EEPROM_ADDR, CFG_ENV_OFFSET+off, buf, n);
+ eeprom_read (CFG_DEF_EEPROM_ADDR, CONFIG_ENV_OFFSET+off, buf, n);
new = crc32 (new, buf, n);
len -= n;
off += n;
@@ -106,5 +103,3 @@ int env_init(void)
return (0);
}
-
-#endif /* CFG_ENV_IS_IN_EEPROM */