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>
This commit is contained in:
Igor Grinberg 2011-11-07 01:13:57 +00:00 committed by Stefano Babic
parent e3150460a4
commit d1459f0fab
11 changed files with 2 additions and 24 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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)
{

View File

@ -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;

View File

@ -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

View File

@ -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";

View File

@ -33,8 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
env_t *env_ptr = NULL;
extern uchar default_environment[];
void env_relocate_spec(void)
{
}

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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>