summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-09-10 22:47:59 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-09-10 22:47:59 +0200
commit957a0e69575683efd70ace147746bbb3d8e7c501 (patch)
tree3af87be7a4e366d6dde5e53bb01fcfc0fc136030 /common
parent9314cee6917444ab88bd4e758da7a30975120187 (diff)
downloadu-boot-imx-957a0e69575683efd70ace147746bbb3d8e7c501.zip
u-boot-imx-957a0e69575683efd70ace147746bbb3d8e7c501.tar.gz
u-boot-imx-957a0e69575683efd70ace147746bbb3d8e7c501.tar.bz2
env_nvram: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'common')
-rw-r--r--common/Makefile2
-rw-r--r--common/env_nvram.c9
2 files changed, 3 insertions, 8 deletions
diff --git a/common/Makefile b/common/Makefile
index 2e0fa26..cb3a742 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -54,7 +54,7 @@ COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
COBJS-y += env_flash.o
COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
-COBJS-y += env_nvram.o
+COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
COBJS-y += env_onenand.o
COBJS-y += env_sf.o
COBJS-y += env_nowhere.o
diff --git a/common/env_nvram.c b/common/env_nvram.c
index c877f00..c59bf9f 100644
--- a/common/env_nvram.c
+++ b/common/env_nvram.c
@@ -41,15 +41,12 @@
*/
#include <common.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#ifdef CONFIG_ENV_IS_IN_NVRAM /* Environment is in NVRAM */
-
#include <command.h>
#include <environment.h>
#include <linux/stddef.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#ifdef CFG_NVRAM_ACCESS_ROUTINE
extern void *nvram_read(void *dest, const long src, size_t count);
extern void nvram_write(long dest, const void *src, size_t count);
@@ -156,5 +153,3 @@ int env_init (void)
#endif
return (0);
}
-
-#endif /* CONFIG_ENV_IS_IN_NVRAM */