diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2011-11-17 06:07:23 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2011-11-22 08:39:25 +0100 |
commit | 994bc671cf8fd3f6d41bb680da738f814f4a9f38 (patch) | |
tree | 27a33cdeef18689c4adc5d4f532df3197de9b5fe /common | |
parent | d1459f0fab1ac145051a74094c96592c694f84af (diff) | |
download | u-boot-imx-994bc671cf8fd3f6d41bb680da738f814f4a9f38.zip u-boot-imx-994bc671cf8fd3f6d41bb680da738f814f4a9f38.tar.gz u-boot-imx-994bc671cf8fd3f6d41bb680da738f814f4a9f38.tar.bz2 |
env: move extern environment[] to environment.h
Extract all extern declarations for environment out of c files
into the environment.h header.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'common')
-rw-r--r-- | common/env_flash.c | 4 | ||||
-rw-r--r-- | common/env_mmc.c | 3 | ||||
-rw-r--r-- | common/env_nand.c | 3 | ||||
-rw-r--r-- | common/env_onenand.c | 6 |
4 files changed, 4 insertions, 12 deletions
diff --git a/common/env_flash.c b/common/env_flash.c index d9f8fcb..e770ee6 100644 --- a/common/env_flash.c +++ b/common/env_flash.c @@ -49,9 +49,7 @@ DECLARE_GLOBAL_DATA_PTR; char * env_name_spec = "Flash"; #ifdef ENV_IS_EMBEDDED - -extern uchar environment[]; -env_t *env_ptr = (env_t *)(&environment[0]); +env_t *env_ptr = &environment; static env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR; diff --git a/common/env_mmc.c b/common/env_mmc.c index 78df808..ef8186c 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -35,8 +35,7 @@ char *env_name_spec = "MMC"; #ifdef ENV_IS_EMBEDDED -extern uchar environment[]; -env_t *env_ptr = (env_t *)(&environment[0]); +env_t *env_ptr = &environment; #else /* ! ENV_IS_EMBEDDED */ env_t *env_ptr = NULL; #endif /* ENV_IS_EMBEDDED */ diff --git a/common/env_nand.c b/common/env_nand.c index 1b12c68..65a867d 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -59,8 +59,7 @@ char *env_name_spec = "NAND"; #if defined(ENV_IS_EMBEDDED) -extern uchar environment[]; -env_t *env_ptr = (env_t *)(&environment[0]); +env_t *env_ptr = &environment; #elif defined(CONFIG_NAND_ENV_DST) env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST; #else /* ! ENV_IS_EMBEDDED */ diff --git a/common/env_onenand.c b/common/env_onenand.c index b7170e6..618c642 100644 --- a/common/env_onenand.c +++ b/common/env_onenand.c @@ -44,10 +44,6 @@ char *env_name_spec = "OneNAND"; #define ONENAND_MAX_ENV_SIZE 4096 #define ONENAND_ENV_SIZE(mtd) (ONENAND_MAX_ENV_SIZE - ENV_HEADER_SIZE) -#ifdef ENV_IS_EMBEDDED -extern uchar environment[]; -#endif /* ENV_IS_EMBEDDED */ - DECLARE_GLOBAL_DATA_PTR; uchar env_get_char_spec(int index) @@ -64,7 +60,7 @@ void env_relocate_spec(void) int rc; size_t retlen; #ifdef ENV_IS_EMBEDDED - char *buf = (char *)&environment[0]; + char *buf = (char *)&environment; #else loff_t env_addr = CONFIG_ENV_ADDR; char onenand_env[ONENAND_MAX_ENV_SIZE]; |