summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2011-11-07 01:13:57 +0000
committerStefano Babic <sbabic@denx.de>2011-11-22 08:39:25 +0100
commitd1459f0fab1ac145051a74094c96592c694f84af (patch)
tree315cf8f8cf8aac1480c43095fe2e36032128061c
parente3150460a4fd3a7126bcbf1e225610e0d494c8fe (diff)
downloadu-boot-imx-d1459f0fab1ac145051a74094c96592c694f84af.zip
u-boot-imx-d1459f0fab1ac145051a74094c96592c694f84af.tar.gz
u-boot-imx-d1459f0fab1ac145051a74094c96592c694f84af.tar.bz2
env: move extern default_environment[] to environment.h
Extract all extern declarations for default_environment[] out of c files into the environment.h header. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
-rw-r--r--board/zeus/zeus.c1
-rw-r--r--common/env_dataflash.c2
-rw-r--r--common/env_flash.c2
-rw-r--r--common/env_mgdisk.c3
-rw-r--r--common/env_mmc.c3
-rw-r--r--common/env_nand.c3
-rw-r--r--common/env_nowhere.c2
-rw-r--r--common/env_nvram.c2
-rw-r--r--common/env_onenand.c3
-rw-r--r--common/env_sf.c3
-rw-r--r--include/environment.h2
11 files changed, 2 insertions, 24 deletions
diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c
index 18cb85f..272e59b 100644
--- a/board/zeus/zeus.c
+++ b/board/zeus/zeus.c
@@ -40,7 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
extern env_t *env_ptr;
-extern uchar default_environment[];
ulong flash_get_size(ulong base, int banknum);
void env_crc_update(void);
diff --git a/common/env_dataflash.c b/common/env_dataflash.c
index 0c4c676..b1386d1 100644
--- a/common/env_dataflash.c
+++ b/common/env_dataflash.c
@@ -37,8 +37,6 @@ extern int write_dataflash(unsigned long addr_dest,
unsigned long addr_src, unsigned long size);
extern int AT91F_DataflashInit(void);
-extern uchar default_environment[];
-
uchar env_get_char_spec(int index)
{
uchar c;
diff --git a/common/env_flash.c b/common/env_flash.c
index 8e415d7..d9f8fcb 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -74,8 +74,6 @@ static env_t *flash_addr_new = (env_t *)CONFIG_ENV_ADDR_REDUND;
static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
#endif /* CONFIG_ENV_ADDR_REDUND */
-extern const uchar default_environment[];
-
uchar env_get_char_spec(int index)
{
diff --git a/common/env_mgdisk.c b/common/env_mgdisk.c
index a69923b..b95d85e 100644
--- a/common/env_mgdisk.c
+++ b/common/env_mgdisk.c
@@ -27,9 +27,6 @@
#include <linux/stddef.h>
#include <mg_disk.h>
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
char *env_name_spec = "MG_DISK";
env_t *env_ptr = 0;
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 12d647a..78df808 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -32,9 +32,6 @@
#include <search.h>
#include <errno.h>
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
char *env_name_spec = "MMC";
#ifdef ENV_IS_EMBEDDED
diff --git a/common/env_nand.c b/common/env_nand.c
index da4d3b1..1b12c68 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -55,9 +55,6 @@
#define CONFIG_ENV_RANGE CONFIG_ENV_SIZE
#endif
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
char *env_name_spec = "NAND";
diff --git a/common/env_nowhere.c b/common/env_nowhere.c
index 75ef78d..a6890db 100644
--- a/common/env_nowhere.c
+++ b/common/env_nowhere.c
@@ -33,8 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
env_t *env_ptr = NULL;
-extern uchar default_environment[];
-
void env_relocate_spec(void)
{
}
diff --git a/common/env_nvram.c b/common/env_nvram.c
index b108e6e..f32d06f 100644
--- a/common/env_nvram.c
+++ b/common/env_nvram.c
@@ -59,8 +59,6 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
char * env_name_spec = "NVRAM";
-extern uchar default_environment[];
-
uchar env_get_char_spec(int index)
{
#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
diff --git a/common/env_onenand.c b/common/env_onenand.c
index 4144475..b7170e6 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -39,9 +39,6 @@
extern struct mtd_info onenand_mtd;
extern struct onenand_chip onenand_chip;
-/* References to names in env_common.c */
-extern uchar default_environment[];
-
char *env_name_spec = "OneNAND";
#define ONENAND_MAX_ENV_SIZE 4096
diff --git a/common/env_sf.c b/common/env_sf.c
index a1ff297..8ff52a3 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -55,9 +55,6 @@ static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND;
DECLARE_GLOBAL_DATA_PTR;
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
char * env_name_spec = "SPI Flash";
static struct spi_flash *env_flash;
diff --git a/include/environment.h b/include/environment.h
index 2c8c4f1..20775da 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -154,6 +154,8 @@ typedef struct environment_s {
unsigned char data[ENV_SIZE]; /* Environment data */
} env_t;
+extern const unsigned char default_environment[];
+
#ifndef DO_DEPS_ONLY
#include <search.h>