mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
env: kill off default_environment_size
The only environment type that uses this variable is spi flash, and that is only because it is reimplementing the common set_default_env() function. So fix the spi flash code and kill off the default_environment_size in the process. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
bedd8403f7
commit
18304f7675
8 changed files with 1 additions and 22 deletions
|
@ -139,11 +139,6 @@ uchar default_environment[] = {
|
|||
"\0"
|
||||
};
|
||||
|
||||
#if defined(CONFIG_ENV_IS_IN_NAND) /* Environment is in Nand Flash */ \
|
||||
|| defined(CONFIG_ENV_IS_IN_SPI_FLASH)
|
||||
int default_environment_size = sizeof(default_environment);
|
||||
#endif
|
||||
|
||||
void env_crc_update (void)
|
||||
{
|
||||
env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
|
||||
|
|
|
@ -35,7 +35,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[];
|
||||
/* extern int default_environment_size; */
|
||||
|
||||
|
||||
uchar env_get_char_spec (int index)
|
||||
|
|
|
@ -83,7 +83,6 @@ static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
|
|||
#endif /* CONFIG_ENV_ADDR_REDUND */
|
||||
|
||||
extern uchar default_environment[];
|
||||
extern int default_environment_size;
|
||||
|
||||
|
||||
uchar env_get_char_spec (int index)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
/* references to names in env_common.c */
|
||||
extern uchar default_environment[];
|
||||
extern int default_environment_size;
|
||||
|
||||
char * env_name_spec = "MG_DISK";
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
|
||||
/* references to names in env_common.c */
|
||||
extern uchar default_environment[];
|
||||
extern int default_environment_size;
|
||||
|
||||
char * env_name_spec = "NAND";
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
env_t *env_ptr = NULL;
|
||||
|
||||
extern uchar default_environment[];
|
||||
extern int default_environment_size;
|
||||
|
||||
|
||||
void env_relocate_spec (void)
|
||||
|
|
|
@ -58,7 +58,6 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
|
|||
char * env_name_spec = "NVRAM";
|
||||
|
||||
extern uchar default_environment[];
|
||||
extern int default_environment_size;
|
||||
|
||||
#ifdef CONFIG_AMIGAONEG3SE
|
||||
uchar env_get_char_spec (int index)
|
||||
|
|
|
@ -47,7 +47,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
|
||||
/* references to names in env_common.c */
|
||||
extern uchar default_environment[];
|
||||
extern int default_environment_size;
|
||||
|
||||
char * env_name_spec = "SPI Flash";
|
||||
env_t *env_ptr;
|
||||
|
@ -143,16 +142,7 @@ err_probe:
|
|||
err_crc:
|
||||
puts("*** Warning - bad CRC, using default environment\n\n");
|
||||
|
||||
if (default_environment_size > CONFIG_ENV_SIZE) {
|
||||
gd->env_valid = 0;
|
||||
puts("*** Error - default environment is too large\n\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(env_ptr, 0, sizeof(env_t));
|
||||
memcpy(env_ptr->data, default_environment, default_environment_size);
|
||||
env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
|
||||
gd->env_valid = 1;
|
||||
set_default_env();
|
||||
}
|
||||
|
||||
int env_init(void)
|
||||
|
|
Loading…
Reference in a new issue