diff options
Diffstat (limited to 'board')
145 files changed, 664 insertions, 664 deletions
diff --git a/board/LEOX/elpt860/flash.c b/board/LEOX/elpt860/flash.c index d77af357a3..668aee2f84 100644 --- a/board/LEOX/elpt860/flash.c +++ b/board/LEOX/elpt860/flash.c @@ -61,8 +61,8 @@ #include <mpc8xx.h> -#ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -125,8 +125,8 @@ flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE-1, &flash_info[0]); #endif diff --git a/board/MAI/AmigaOneG3SE/flash_new.c b/board/MAI/AmigaOneG3SE/flash_new.c index 5e15e20489..3efee7e98e 100644 --- a/board/MAI/AmigaOneG3SE/flash_new.c +++ b/board/MAI/AmigaOneG3SE/flash_new.c @@ -126,8 +126,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/RRvision/flash.c b/board/RRvision/flash.c index 287bbac8c6..6608bca137 100644 --- a/board/RRvision/flash.c +++ b/board/RRvision/flash.c @@ -26,8 +26,8 @@ #include <common.h> #include <mpc8xx.h> -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -80,8 +80,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif diff --git a/board/a3000/flash.c b/board/a3000/flash.c index 98a027e783..add2a28866 100644 --- a/board/a3000/flash.c +++ b/board/a3000/flash.c @@ -26,14 +26,14 @@ #include <mpc824x.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -110,10 +110,10 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ - DEBUGF("protect environtment %x @ %x\n", CFG_ENV_ADDR, CFG_ENV_SECT_SIZE); + DEBUGF("protect environtment %x @ %x\n", CONFIG_ENV_ADDR, CONFIG_ENV_SECT_SIZE); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif diff --git a/board/alaska/flash.c b/board/alaska/flash.c index 715616063c..556c16893f 100644 --- a/board/alaska/flash.c +++ b/board/alaska/flash.c @@ -144,11 +144,11 @@ unsigned long flash_init (void) #endif flash_protect (FLAG_PROTECT_SET, - CFG_ENV1_ADDR, - CFG_ENV1_ADDR + CFG_ENV1_SIZE - 1, &flash_info[1]); + CONFIG_ENV1_ADDR, + CONFIG_ENV1_ADDR + CONFIG_ENV1_SIZE - 1, &flash_info[1]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[3]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[3]); return size; } diff --git a/board/amcc/bamboo/flash.c b/board/amcc/bamboo/flash.c index f23fc249c4..d004ed7859 100644 --- a/board/amcc/bamboo/flash.c +++ b/board/amcc/bamboo/flash.c @@ -154,12 +154,12 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[i]); #if defined(CONFIG_ENV_IS_IN_FLASH) - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR_REDUND) - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR_REDUND) + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); #endif #endif diff --git a/board/amcc/bubinga/flash.c b/board/amcc/bubinga/flash.c index 0295b8c708..d71cc292e9 100644 --- a/board/amcc/bubinga/flash.c +++ b/board/amcc/bubinga/flash.c @@ -85,11 +85,11 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]); #ifdef CONFIG_ENV_IS_IN_FLASH - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/amcc/ebony/flash.c b/board/amcc/ebony/flash.c index b49e05f6da..d9c69744b9 100644 --- a/board/amcc/ebony/flash.c +++ b/board/amcc/ebony/flash.c @@ -125,11 +125,11 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[2]); #ifdef CONFIG_ENV_IS_IN_FLASH - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[2]); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[2]); #endif diff --git a/board/amcc/luan/flash.c b/board/amcc/luan/flash.c index 3b2f9b746f..d28bf9d23e 100644 --- a/board/amcc/luan/flash.c +++ b/board/amcc/luan/flash.c @@ -96,11 +96,11 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[2]); #ifdef CONFIG_ENV_IS_IN_FLASH - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[2]); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[2]); #endif diff --git a/board/amcc/ocotea/flash.c b/board/amcc/ocotea/flash.c index 88a76f7da6..46c6946f3e 100644 --- a/board/amcc/ocotea/flash.c +++ b/board/amcc/ocotea/flash.c @@ -135,11 +135,11 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[i]); #ifdef CONFIG_ENV_IS_IN_FLASH - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); #endif diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c index c682c8e3e8..e439fb90e2 100644 --- a/board/amcc/sequoia/sequoia.c +++ b/board/amcc/sequoia/sequoia.c @@ -166,8 +166,8 @@ int misc_init_r(void) /* Env protection ON by default */ (void)flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/amcc/taihu/flash.c b/board/amcc/taihu/flash.c index 8ffcc39346..ae92bb25b3 100644 --- a/board/amcc/taihu/flash.c +++ b/board/amcc/taihu/flash.c @@ -88,11 +88,11 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]); #ifdef CONFIG_ENV_IS_IN_FLASH - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif /* Also protect sector containing initial power-up instruction */ diff --git a/board/amcc/walnut/flash.c b/board/amcc/walnut/flash.c index d47d263e9e..fe6ca6c5c5 100644 --- a/board/amcc/walnut/flash.c +++ b/board/amcc/walnut/flash.c @@ -83,11 +83,11 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[0]); #ifdef CONFIG_ENV_IS_IN_FLASH - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/amcc/yucca/flash.c b/board/amcc/yucca/flash.c index 9256938dde..c4053465fe 100644 --- a/board/amcc/yucca/flash.c +++ b/board/amcc/yucca/flash.c @@ -1038,12 +1038,12 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[i]); #if defined(CONFIG_ENV_IS_IN_FLASH) - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); -#if defined(CFG_ENV_ADDR_REDUND) - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, +#if defined(CONFIG_ENV_ADDR_REDUND) + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); #endif #endif diff --git a/board/armadillo/flash.c b/board/armadillo/flash.c index 8518856cb1..6ed88f401b 100644 --- a/board/armadillo/flash.c +++ b/board/armadillo/flash.c @@ -74,8 +74,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/atc/flash.c b/board/atc/flash.c index 9e4c6c512e..7835e8f456 100644 --- a/board/atc/flash.c +++ b/board/atc/flash.c @@ -98,9 +98,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif diff --git a/board/atmel/at91rm9200dk/flash.c b/board/atmel/at91rm9200dk/flash.c index 0513d61d73..ef8d9a8309 100644 --- a/board/atmel/at91rm9200dk/flash.c +++ b/board/atmel/at91rm9200dk/flash.c @@ -221,8 +221,8 @@ ulong flash_init (void) /* Protect environment variables */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); /* Protect U-Boot gzipped image */ flash_protect (FLAG_PROTECT_SET, diff --git a/board/barco/flash.c b/board/barco/flash.c index c6a01cacaa..53fc58ca15 100644 --- a/board/barco/flash.c +++ b/board/barco/flash.c @@ -59,14 +59,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -224,10 +224,10 @@ unsigned long flash_init(void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/bmw/bmw.c b/board/bmw/bmw.c index 043143163a..b629c38272 100644 --- a/board/bmw/bmw.c +++ b/board/bmw/bmw.c @@ -125,7 +125,7 @@ void doc_init (void) doc_probe(DOC_BASE_ADDR); } -#define NV_ADDR ((volatile unsigned char *) CFG_ENV_ADDR) +#define NV_ADDR ((volatile unsigned char *) CONFIG_ENV_ADDR) /* Read from NVRAM */ void* diff --git a/board/bmw/flash.c b/board/bmw/flash.c index 4c7971aee5..0d0bc2f78b 100644 --- a/board/bmw/flash.c +++ b/board/bmw/flash.c @@ -32,14 +32,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -224,10 +224,10 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/c2mon/flash.c b/board/c2mon/flash.c index 2a5e050abb..7cc5ef0c3b 100644 --- a/board/c2mon/flash.c +++ b/board/c2mon/flash.c @@ -24,8 +24,8 @@ #include <common.h> #include <mpc8xx.h> -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -98,8 +98,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif @@ -125,8 +125,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/cerf250/flash.c b/board/cerf250/flash.c index ba82892dde..3ff19bc5e5 100644 --- a/board/cerf250/flash.c +++ b/board/cerf250/flash.c @@ -90,8 +90,8 @@ unsigned long flash_init (void) &flash_info[0] ); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; } diff --git a/board/cmc_pu2/flash.c b/board/cmc_pu2/flash.c index 0419d76200..8966399f7a 100644 --- a/board/cmc_pu2/flash.c +++ b/board/cmc_pu2/flash.c @@ -29,8 +29,8 @@ #include <common.h> -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -74,9 +74,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif return size ? size : 1; diff --git a/board/cmi/cmi.c b/board/cmi/cmi.c index 8501cae21a..ee243db66a 100644 --- a/board/cmi/cmi.c +++ b/board/cmi/cmi.c @@ -70,4 +70,4 @@ phys_size_t initdram(int board_type) /* * Absolute environment address for linker file. */ -GEN_ABS(env_start, CFG_ENV_OFFSET + CFG_FLASH_BASE); +GEN_ABS(env_start, CONFIG_ENV_OFFSET + CFG_FLASH_BASE); diff --git a/board/cmi/flash.c b/board/cmi/flash.c index aec6a8ef92..0d4582b239 100644 --- a/board/cmi/flash.c +++ b/board/cmi/flash.c @@ -37,14 +37,14 @@ #include <mpc5xx.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -113,8 +113,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif diff --git a/board/cogent/flash.c b/board/cogent/flash.c index fc3e5ff88e..942f33ab02 100644 --- a/board/cogent/flash.c +++ b/board/cogent/flash.c @@ -27,14 +27,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -330,8 +330,8 @@ flash_init(void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif return total; diff --git a/board/cpc45/flash.c b/board/cpc45/flash.c index db9a637b56..3826a54a3d 100644 --- a/board/cpc45/flash.c +++ b/board/cpc45/flash.c @@ -26,14 +26,14 @@ #include <asm/processor.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -174,15 +174,15 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -#if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +#if CONFIG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[1]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[1]); #else flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif #endif diff --git a/board/cpu86/flash.c b/board/cpu86/flash.c index e6a14b0d8f..845a3b2af9 100644 --- a/board/cpu86/flash.c +++ b/board/cpu86/flash.c @@ -230,20 +230,20 @@ unsigned long flash_init (void) #endif #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# if CFG_ENV_ADDR >= CFG_BOOTROM_BASE +# if CONFIG_ENV_ADDR >= CFG_BOOTROM_BASE if (size_b1) { flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[1]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[1]); } # else flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); # endif #endif diff --git a/board/cpu87/flash.c b/board/cpu87/flash.c index b96a30c5a3..f7e121f09c 100644 --- a/board/cpu87/flash.c +++ b/board/cpu87/flash.c @@ -236,20 +236,20 @@ unsigned long flash_init (void) #endif #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# if CFG_ENV_ADDR >= CFG_BOOTROM_BASE +# if CONFIG_ENV_ADDR >= CFG_BOOTROM_BASE if (size_b1) { flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[1]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[1]); } # else flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); # endif #endif diff --git a/board/cradle/flash.c b/board/cradle/flash.c index f3f9a8ccea..4783d92608 100644 --- a/board/cradle/flash.c +++ b/board/cradle/flash.c @@ -76,8 +76,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/csb226/flash.c b/board/csb226/flash.c index f6dfd96177..2a609094a6 100644 --- a/board/csb226/flash.c +++ b/board/csb226/flash.c @@ -81,8 +81,8 @@ ulong flash_init(void) &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; diff --git a/board/cu824/flash.c b/board/cu824/flash.c index 5e55284a7d..6fe2978c20 100644 --- a/board/cu824/flash.c +++ b/board/cu824/flash.c @@ -26,14 +26,14 @@ #include <asm/processor.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -135,16 +135,16 @@ unsigned long flash_init(void) #endif #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -#if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +#if CONFIG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[1]); #else flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif #endif diff --git a/board/dnp1110/flash.c b/board/dnp1110/flash.c index 60874ba9b8..84b820aaa1 100644 --- a/board/dnp1110/flash.c +++ b/board/dnp1110/flash.c @@ -88,8 +88,8 @@ unsigned long flash_init (void) &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; diff --git a/board/eltec/elppc/misc.c b/board/eltec/elppc/misc.c index 5fb20ae66c..5e3a81c6e1 100644 --- a/board/eltec/elppc/misc.c +++ b/board/eltec/elppc/misc.c @@ -42,7 +42,7 @@ extern int read_eeprom (struct eth_device *dev, int location, int addr_len); void *nvram_read (void *dest, const long src, size_t count) { uchar *d = (uchar *) dest; - uchar *s = (uchar *) (CFG_ENV_MAP_ADRS + src); + uchar *s = (uchar *) (CONFIG_ENV_MAP_ADRS + src); while (count--) *d++ = *s++; @@ -52,7 +52,7 @@ void *nvram_read (void *dest, const long src, size_t count) void nvram_write (long dest, const void *src, size_t count) { - uchar *d = (uchar *) (CFG_ENV_MAP_ADRS + dest); + uchar *d = (uchar *) (CONFIG_ENV_MAP_ADRS + dest); uchar *s = (uchar *) src; while (count--) diff --git a/board/emk/common/flash.c b/board/emk/common/flash.c index 0e8d337f72..04c35bc93f 100644 --- a/board/emk/common/flash.c +++ b/board/emk/common/flash.c @@ -116,9 +116,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif diff --git a/board/ep7312/flash.c b/board/ep7312/flash.c index 272a9e5cce..1ef06f861f 100644 --- a/board/ep7312/flash.c +++ b/board/ep7312/flash.c @@ -65,8 +65,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/ep8260/flash.c b/board/ep8260/flash.c index 8d996407cd..d32486d345 100644 --- a/board/ep8260/flash.c +++ b/board/ep8260/flash.c @@ -157,13 +157,13 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 005871cfe8..fb349576a8 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -691,7 +691,7 @@ U_BOOT_CMD( ); #define CFG_I2C_EEPROM_ADDR_2 0x51 /* EEPROM CAT28WC32 */ -#define CFG_ENV_SIZE_2 0x800 /* 2048 bytes may be used for env vars*/ +#define CONFIG_ENV_SIZE_2 0x800 /* 2048 bytes may be used for env vars*/ /* * Write backplane ip-address... @@ -705,11 +705,11 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) char *ptr; IPaddr_t ipaddr; - buf = malloc(CFG_ENV_SIZE_2); - if (eeprom_read(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CFG_ENV_SIZE_2)) { + buf = malloc(CONFIG_ENV_SIZE_2); + if (eeprom_read(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CONFIG_ENV_SIZE_2)) { puts("\nError reading backplane EEPROM!\n"); } else { - crc = crc32(0, (uchar *)(buf+4), CFG_ENV_SIZE_2-4); + crc = crc32(0, (uchar *)(buf+4), CONFIG_ENV_SIZE_2-4); if (crc != *(ulong *)buf) { printf("ERROR: crc mismatch %08lx %08lx\n", crc, *(ulong *)buf); return -1; @@ -764,14 +764,14 @@ int do_set_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } printf("Setting bp_ip to %s\n", argv[1]); - buf = malloc(CFG_ENV_SIZE_2); - memset(buf, 0, CFG_ENV_SIZE_2); + buf = malloc(CONFIG_ENV_SIZE_2); + memset(buf, 0, CONFIG_ENV_SIZE_2); sprintf(str, "bp_ip=%s", argv[1]); strcpy(buf+4, str); - crc = crc32(0, (uchar *)(buf+4), CFG_ENV_SIZE_2-4); + crc = crc32(0, (uchar *)(buf+4), CONFIG_ENV_SIZE_2-4); *(ulong *)buf = crc; - if (eeprom_write(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CFG_ENV_SIZE_2)) { + if (eeprom_write(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CONFIG_ENV_SIZE_2)) { puts("\nError writing backplane EEPROM!\n"); } diff --git a/board/esd/pf5200/flash.c b/board/esd/pf5200/flash.c index 55419eeb91..8178b56ce7 100644 --- a/board/esd/pf5200/flash.c +++ b/board/esd/pf5200/flash.c @@ -78,9 +78,9 @@ unsigned long flash_init(void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ - flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, - flash_get_info(CFG_ENV_ADDR)); + flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, + flash_get_info(CONFIG_ENV_ADDR)); #endif flash_afterinit(i, flash_info[i].start[0], flash_info[i].size); diff --git a/board/esd/pmc440/cmd_pmc440.c b/board/esd/pmc440/cmd_pmc440.c index ca5c177e34..74cf4c3e15 100644 --- a/board/esd/pmc440/cmd_pmc440.c +++ b/board/esd/pmc440/cmd_pmc440.c @@ -363,11 +363,11 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf("PARAM: @%08x\n", param); memset((void*)param, 0, (pram << 10)); - env_base = memsize - 4096 - ((CFG_ENV_SIZE + 4096) & ~(4096-1)); - memcpy((void*)env_base, env_ptr, CFG_ENV_SIZE); + env_base = memsize - 4096 - ((CONFIG_ENV_SIZE + 4096) & ~(4096-1)); + memcpy((void*)env_base, env_ptr, CONFIG_ENV_SIZE); lptr = (ulong*)memsize; - *(--lptr) = CFG_ENV_SIZE; + *(--lptr) = CONFIG_ENV_SIZE; *(--lptr) = memsize - env_base; *(--lptr) = crc32(0, (void*)(memsize - 0x08), 0x08); *(--lptr) = 0; diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c index 7c8fa74c6f..85ef26f67b 100644 --- a/board/esd/pmc440/pmc440.c +++ b/board/esd/pmc440/pmc440.c @@ -248,8 +248,8 @@ int misc_init_r(void) /* Env protection ON by default */ (void)flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/etin/debris/debris.c b/board/etin/debris/debris.c index 3fcf78ecfd..a5d394c8f6 100644 --- a/board/etin/debris/debris.c +++ b/board/etin/debris/debris.c @@ -174,7 +174,7 @@ void nvram_write(long dest, const void *src, size_t count) int misc_init_r(void) { /* Write ethernet addr in NVRAM for VxWorks */ - nvram_write(CFG_ENV_ADDR + CFG_NVRAM_VXWORKS_OFFS, + nvram_write(CONFIG_ENV_ADDR + CFG_NVRAM_VXWORKS_OFFS, (char*)&gd->bd->bi_enetaddr[0], 6); return 0; } diff --git a/board/evb4510/flash.c b/board/evb4510/flash.c index aff92f95e9..bcefafcd93 100644 --- a/board/evb4510/flash.c +++ b/board/evb4510/flash.c @@ -399,7 +399,7 @@ unsigned long flash_init (void) amd160base, amd160base + monitor_flash_len - 1, info); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, CFG_ENV_ADDR + CFG_ENV_SIZE - 1, info); + CONFIG_ENV_ADDR, CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, info); #if CFG_MAX_FLASH_BANKS == 2 /* Configure AMD Am29LV040B (512KB) */ diff --git a/board/evb64260/flash.c b/board/evb64260/flash.c index 1691e108c2..f2d5390ac4 100644 --- a/board/evb64260/flash.c +++ b/board/evb64260/flash.c @@ -122,9 +122,9 @@ flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, + flash_get_info(CONFIG_ENV_ADDR)); #endif flash_size = size_b0 + size_b1; diff --git a/board/exbitgen/flash.c b/board/exbitgen/flash.c index 4d83fd5efd..745fba2af8 100644 --- a/board/exbitgen/flash.c +++ b/board/exbitgen/flash.c @@ -126,10 +126,10 @@ unsigned long flash_init (void) #endif #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/fads/fads.h b/board/fads/fads.h index 63b1e625e5..23310a4391 100644 --- a/board/fads/fads.h +++ b/board/fads/fads.h @@ -227,9 +227,9 @@ #define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CFG_ENV_SECT_SIZE 0x40000 /* see README - env sector total size */ -#define CFG_ENV_OFFSET CFG_ENV_SECT_SIZE -#define CFG_ENV_SIZE 0x4000 /* Total Size of Environment */ +#define CONFIG_ENV_SECT_SIZE 0x40000 /* see README - env sector total size */ +#define CONFIG_ENV_OFFSET CONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment */ #define CFG_USE_PPCENV /* Environment embedded in sect .ppcenv */ #define CFG_DIRECT_FLASH_TFTP diff --git a/board/fads/flash.c b/board/fads/flash.c index 742a88979b..cd0e4d5dc2 100644 --- a/board/fads/flash.c +++ b/board/fads/flash.c @@ -27,14 +27,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -126,10 +126,10 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ - if (CFG_ENV_ADDR >= flash_info[i].start[0]) + if (CONFIG_ENV_ADDR >= flash_info[i].start[0]) flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[i]); #endif } diff --git a/board/flagadm/flash.c b/board/flagadm/flash.c index 3303707817..aa8b0f9943 100644 --- a/board/flagadm/flash.c +++ b/board/flagadm/flash.c @@ -84,8 +84,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_OFFSET, - CFG_ENV_OFFSET+CFG_ENV_SIZE-1, + CONFIG_ENV_OFFSET, + CONFIG_ENV_OFFSET+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif return (flash_info[0].size); diff --git a/board/freescale/mpc8260ads/flash.c b/board/freescale/mpc8260ads/flash.c index 5f80f26e0c..7fcc874391 100644 --- a/board/freescale/mpc8260ads/flash.c +++ b/board/freescale/mpc8260ads/flash.c @@ -158,8 +158,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif return (size); diff --git a/board/freescale/mpc8266ads/flash.c b/board/freescale/mpc8266ads/flash.c index aa533e4b90..b4cdcd9104 100644 --- a/board/freescale/mpc8266ads/flash.c +++ b/board/freescale/mpc8266ads/flash.c @@ -32,14 +32,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -108,8 +108,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif return (size); diff --git a/board/funkwerk/vovpn-gw/flash.c b/board/funkwerk/vovpn-gw/flash.c index 935adfa1a0..0308611eb6 100644 --- a/board/funkwerk/vovpn-gw/flash.c +++ b/board/funkwerk/vovpn-gw/flash.c @@ -153,8 +153,8 @@ flash_init(void) #endif #ifdef CONFIG_ENV_IS_IN_FLASH flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif return (size); diff --git a/board/gcplus/flash.c b/board/gcplus/flash.c index 36d7363a80..48f33b2b7a 100644 --- a/board/gcplus/flash.c +++ b/board/gcplus/flash.c @@ -87,8 +87,8 @@ flash_init(void) CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/gen860t/flash.c b/board/gen860t/flash.c index c558014e7d..a46e7e6080 100644 --- a/board/gen860t/flash.c +++ b/board/gen860t/flash.c @@ -26,14 +26,14 @@ #include <mpc8xx.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -166,8 +166,8 @@ flash_init (void) * Environment protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/gw8260/flash.c b/board/gw8260/flash.c index e4b596b0ca..6cf311f2e0 100644 --- a/board/gw8260/flash.c +++ b/board/gw8260/flash.c @@ -100,13 +100,13 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/hidden_dragon/flash.c b/board/hidden_dragon/flash.c index 5fb9578bb0..10293b4be9 100644 --- a/board/hidden_dragon/flash.c +++ b/board/hidden_dragon/flash.c @@ -36,14 +36,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -212,10 +212,10 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/icecube/flash.c b/board/icecube/flash.c index e6cf92e3df..0aa78eb27f 100644 --- a/board/icecube/flash.c +++ b/board/icecube/flash.c @@ -91,9 +91,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif diff --git a/board/icu862/flash.c b/board/icu862/flash.c index 625d1a8647..e6382f5fe9 100644 --- a/board/icu862/flash.c +++ b/board/icu862/flash.c @@ -27,14 +27,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -111,8 +111,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif diff --git a/board/ids8247/flash.c b/board/ids8247/flash.c index 522fafe435..5800ce2f82 100644 --- a/board/ids8247/flash.c +++ b/board/ids8247/flash.c @@ -34,14 +34,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -116,8 +116,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/impa7/flash.c b/board/impa7/flash.c index ca76fe8327..1dea22b380 100644 --- a/board/impa7/flash.c +++ b/board/impa7/flash.c @@ -74,8 +74,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/incaip/flash.c b/board/incaip/flash.c index b510e900cd..74dd6fee62 100644 --- a/board/incaip/flash.c +++ b/board/incaip/flash.c @@ -107,9 +107,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif diff --git a/board/innokom/flash.c b/board/innokom/flash.c index 2d773b1b04..7f17ba6c12 100644 --- a/board/innokom/flash.c +++ b/board/innokom/flash.c @@ -116,8 +116,8 @@ ulong flash_init(void) #ifdef CONFIG_ENV_IS_IN_FLASH flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/integratorcp/flash.c b/board/integratorcp/flash.c index 2a4256abdf..7effea6aac 100644 --- a/board/integratorcp/flash.c +++ b/board/integratorcp/flash.c @@ -128,8 +128,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/ip860/flash.c b/board/ip860/flash.c index 6bf4d8da6d..10a96c58fd 100644 --- a/board/ip860/flash.c +++ b/board/ip860/flash.c @@ -27,14 +27,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -97,8 +97,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif return (size); diff --git a/board/iphase4539/flash.c b/board/iphase4539/flash.c index f8ab51a7e6..098dcc2a4d 100644 --- a/board/iphase4539/flash.c +++ b/board/iphase4539/flash.c @@ -78,8 +78,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, flash_info + bank); #endif diff --git a/board/ivm/flash.c b/board/ivm/flash.c index f911fdb5bd..29821ba139 100644 --- a/board/ivm/flash.c +++ b/board/ivm/flash.c @@ -27,14 +27,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -94,8 +94,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif diff --git a/board/ixdp425/flash.c b/board/ixdp425/flash.c index 704dea8637..0bae9e09ee 100644 --- a/board/ixdp425/flash.c +++ b/board/ixdp425/flash.c @@ -86,8 +86,8 @@ unsigned long flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/korat/korat.c b/board/korat/korat.c index 0d90fb31da..8787e231ec 100644 --- a/board/korat/korat.c +++ b/board/korat/korat.c @@ -71,7 +71,7 @@ int board_early_init_f(void) if (gpio_read_in_bit(CFG_GPIO_RESET_PRESSED_)) { /* This call does not return. */ korat_branch_absolute( - CFG_FLASH1_TOP - 2 * CFG_ENV_SECT_SIZE - 4); + CFG_FLASH1_TOP - 2 * CONFIG_ENV_SECT_SIZE - 4); } } korat_buzzer(1); @@ -375,7 +375,7 @@ int misc_init_r(void) * environment */ gd->bd->bi_flashoffset = - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - CFG_FLASH1_ADDR; + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - CFG_FLASH1_ADDR; mtdcr(ebccfga, pb1cr); pbcr = mfdcr(ebccfgd); @@ -395,11 +395,11 @@ int misc_init_r(void) flash_info); #endif /* Env protection ON by default */ - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, flash_info); - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, flash_info); /* diff --git a/board/kup/common/flash.c b/board/kup/common/flash.c index 50bf5439f7..7688ce2c41 100644 --- a/board/kup/common/flash.c +++ b/board/kup/common/flash.c @@ -24,8 +24,8 @@ #include <common.h> #include <mpc8xx.h> -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif #define CONFIG_FLASH_16BIT @@ -81,8 +81,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif diff --git a/board/lantec/flash.c b/board/lantec/flash.c index ddf680a316..e08da33b35 100644 --- a/board/lantec/flash.c +++ b/board/lantec/flash.c @@ -30,14 +30,14 @@ #include <mpc8xx.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -141,8 +141,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif @@ -173,8 +173,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/lart/flash.c b/board/lart/flash.c index 28c4531c02..4326d0738e 100644 --- a/board/lart/flash.c +++ b/board/lart/flash.c @@ -109,8 +109,8 @@ ulong flash_init(void) &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; diff --git a/board/logodl/flash.c b/board/logodl/flash.c index 0807b80913..4d9c118729 100644 --- a/board/logodl/flash.c +++ b/board/logodl/flash.c @@ -109,8 +109,8 @@ ulong flash_init(void) &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; diff --git a/board/lpc2292sodimm/flash.c b/board/lpc2292sodimm/flash.c index 0fb08430c5..449a768271 100644 --- a/board/lpc2292sodimm/flash.c +++ b/board/lpc2292sodimm/flash.c @@ -97,8 +97,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; diff --git a/board/lpd7a40x/flash.c b/board/lpd7a40x/flash.c index d18720e5b2..ec438073b2 100644 --- a/board/lpd7a40x/flash.c +++ b/board/lpd7a40x/flash.c @@ -97,13 +97,13 @@ ulong flash_init (void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/lubbock/flash.c b/board/lubbock/flash.c index ba82892dde..3ff19bc5e5 100644 --- a/board/lubbock/flash.c +++ b/board/lubbock/flash.c @@ -90,8 +90,8 @@ unsigned long flash_init (void) &flash_info[0] ); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; } diff --git a/board/lwmon/flash.c b/board/lwmon/flash.c index 7e4acc2481..8d98545a53 100644 --- a/board/lwmon/flash.c +++ b/board/lwmon/flash.c @@ -27,14 +27,14 @@ #include <mpc8xx.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -133,8 +133,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif @@ -166,8 +166,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c index 85795b7c2a..8975bfd3d2 100644 --- a/board/lwmon5/lwmon5.c +++ b/board/lwmon5/lwmon5.c @@ -200,8 +200,8 @@ int misc_init_r(void) /* Env protection ON by default */ (void)flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[1]); /* diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c index 44446501f9..65b818471a 100644 --- a/board/mcc200/mcc200.c +++ b/board/mcc200/mcc200.c @@ -263,14 +263,14 @@ int misc_init_r (void) /* Environment protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); /* Redundant environment protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); } diff --git a/board/modnet50/flash.c b/board/modnet50/flash.c index a50639e09b..fb12e03b6e 100644 --- a/board/modnet50/flash.c +++ b/board/modnet50/flash.c @@ -181,8 +181,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/mp2usb/flash.c b/board/mp2usb/flash.c index c19d445e20..527e74ef13 100644 --- a/board/mp2usb/flash.c +++ b/board/mp2usb/flash.c @@ -98,8 +98,8 @@ unsigned long flash_init (void) &flash_info[0] ); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; } diff --git a/board/mpc8540eval/flash.c b/board/mpc8540eval/flash.c index b129602a6e..98fd168859 100644 --- a/board/mpc8540eval/flash.c +++ b/board/mpc8540eval/flash.c @@ -36,14 +36,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -106,8 +106,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif #endif diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c index 1f9a7726f1..8454420f10 100644 --- a/board/mpl/common/common_util.c +++ b/board/mpl/common/common_util.c @@ -309,7 +309,7 @@ void clear_env_values(void) memset(&back,0xff,sizeof(backup_t)); memset(env_crc,0x00,4); i2c_write(CFG_DEF_EEPROM_ADDR,I2C_BACKUP_ADDR,2,(void *)&back,sizeof(backup_t)); - i2c_write(CFG_DEF_EEPROM_ADDR,CFG_ENV_OFFSET,2,(void *)env_crc,4); + i2c_write(CFG_DEF_EEPROM_ADDR,CONFIG_ENV_OFFSET,2,(void *)env_crc,4); } /* @@ -323,7 +323,7 @@ int check_env_old_size(ulong oldsize) /* read old CRC */ eeprom_read (CFG_DEF_EEPROM_ADDR, - CFG_ENV_OFFSET, + CONFIG_ENV_OFFSET, (uchar *)&crc, sizeof(ulong)); new = 0; @@ -333,7 +333,7 @@ int check_env_old_size(ulong oldsize) while (len > 0) { int n = (len > sizeof(buf)) ? sizeof(buf) : len; - eeprom_read (CFG_DEF_EEPROM_ADDR, CFG_ENV_OFFSET+off, buf, n); + eeprom_read (CFG_DEF_EEPROM_ADDR, CONFIG_ENV_OFFSET+off, buf, n); new = crc32 (new, buf, n); len -= n; off += n; @@ -362,7 +362,7 @@ void copy_old_env(ulong size) len=size; off = sizeof(long); while (len > off) { - eeprom_read (CFG_DEF_EEPROM_ADDR, CFG_ENV_OFFSET+off, &c, 1); + eeprom_read (CFG_DEF_EEPROM_ADDR, CONFIG_ENV_OFFSET+off, &c, 1); if(c != '=') { *name++=c; off++; @@ -371,7 +371,7 @@ void copy_old_env(ulong size) *name++='\0'; off++; do { - eeprom_read (CFG_DEF_EEPROM_ADDR, CFG_ENV_OFFSET+off, &c, 1); + eeprom_read (CFG_DEF_EEPROM_ADDR, CONFIG_ENV_OFFSET+off, &c, 1); *value++=c; off++; if(c == '\0') diff --git a/board/mpl/common/flash.c b/board/mpl/common/flash.c index a2e0244d89..b2d4f6f5e5 100644 --- a/board/mpl/common/flash.c +++ b/board/mpl/common/flash.c @@ -259,8 +259,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif #endif /* #if !defined(CONFIG_PATI) */ diff --git a/board/mpl/pati/pati.c b/board/mpl/pati/pati.c index 475741d2af..0883c429fa 100644 --- a/board/mpl/pati/pati.c +++ b/board/mpl/pati/pati.c @@ -615,4 +615,4 @@ void pci_con_disc(void) /* * Absolute environment address for linker file. */ -GEN_ABS(env_start, CFG_ENV_OFFSET + CFG_FLASH_BASE); +GEN_ABS(env_start, CONFIG_ENV_OFFSET + CFG_FLASH_BASE); diff --git a/board/mpl/vcma9/flash.c b/board/mpl/vcma9/flash.c index d15a19115e..3895263fbe 100644 --- a/board/mpl/vcma9/flash.c +++ b/board/mpl/vcma9/flash.c @@ -116,8 +116,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/musenki/flash.c b/board/musenki/flash.c index df7bbc5488..46035d77cc 100644 --- a/board/musenki/flash.c +++ b/board/musenki/flash.c @@ -25,14 +25,14 @@ #include <mpc824x.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -155,10 +155,10 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ - DEBUGF("protect environtment %x @ %x\n", CFG_ENV_ADDR, CFG_ENV_SECT_SIZE); + DEBUGF("protect environtment %x @ %x\n", CONFIG_ENV_ADDR, CONFIG_ENV_SECT_SIZE); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif @@ -177,8 +177,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/mx1ads/syncflash.c b/board/mx1ads/syncflash.c index fae9fbb39d..0ffc3783bf 100644 --- a/board/mx1ads/syncflash.c +++ b/board/mx1ads/syncflash.c @@ -183,8 +183,8 @@ ulong flash_init(void) { &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return FLASH_BANK_SIZE; diff --git a/board/mx1fs2/flash.c b/board/mx1fs2/flash.c index 73ce8957e0..8be0f49116 100644 --- a/board/mx1fs2/flash.c +++ b/board/mx1fs2/flash.c @@ -106,8 +106,8 @@ flash_init(void) &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/nc650/flash.c b/board/nc650/flash.c index a7fc084afa..d23e97625a 100644 --- a/board/nc650/flash.c +++ b/board/nc650/flash.c @@ -42,14 +42,14 @@ DECLARE_GLOBAL_DATA_PTR; flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -174,8 +174,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/netphone/flash.c b/board/netphone/flash.c index 0c81140f23..cf0bc095b1 100644 --- a/board/netphone/flash.c +++ b/board/netphone/flash.c @@ -72,14 +72,14 @@ unsigned long flash_init(void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/netstal/hcu5/hcu5.c b/board/netstal/hcu5/hcu5.c index 41fa2048dd..f3428c2ad8 100644 --- a/board/netstal/hcu5/hcu5.c +++ b/board/netstal/hcu5/hcu5.c @@ -247,11 +247,11 @@ int misc_init_r(void) 0xffffffff, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND /* Env protection ON by default */ (void)flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif #endif diff --git a/board/netta/flash.c b/board/netta/flash.c index ca3e061c27..531204c765 100644 --- a/board/netta/flash.c +++ b/board/netta/flash.c @@ -68,14 +68,14 @@ unsigned long flash_init(void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/netta2/flash.c b/board/netta2/flash.c index a1c87f5131..cefff71332 100644 --- a/board/netta2/flash.c +++ b/board/netta2/flash.c @@ -69,14 +69,14 @@ unsigned long flash_init(void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/netvia/flash.c b/board/netvia/flash.c index d31f7707f7..647f5944b5 100644 --- a/board/netvia/flash.c +++ b/board/netvia/flash.c @@ -68,14 +68,14 @@ unsigned long flash_init(void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/ns9750dev/flash.c b/board/ns9750dev/flash.c index e7d65157f7..2b62bef4d9 100644 --- a/board/ns9750dev/flash.c +++ b/board/ns9750dev/flash.c @@ -108,8 +108,8 @@ unsigned long flash_init (void) CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/o2dnt/flash.c b/board/o2dnt/flash.c index 2aa0489da1..1cf78c7b82 100644 --- a/board/o2dnt/flash.c +++ b/board/o2dnt/flash.c @@ -106,9 +106,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif diff --git a/board/omap1610inn/flash.c b/board/omap1610inn/flash.c index c8e4c9e25a..d88a981d53 100644 --- a/board/omap1610inn/flash.c +++ b/board/omap1610inn/flash.c @@ -112,8 +112,8 @@ unsigned long flash_init (void) CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/omap730p2/flash.c b/board/omap730p2/flash.c index e7d65157f7..2b62bef4d9 100644 --- a/board/omap730p2/flash.c +++ b/board/omap730p2/flash.c @@ -108,8 +108,8 @@ unsigned long flash_init (void) CFG_FLASH_BASE + monitor_flash_len - 1, &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/oxc/flash.c b/board/oxc/flash.c index 44e2300e94..94d2660e1d 100644 --- a/board/oxc/flash.c +++ b/board/oxc/flash.c @@ -73,13 +73,13 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/pcippc2/flash.c b/board/pcippc2/flash.c index b1fec97dd3..a915fbe63f 100644 --- a/board/pcippc2/flash.c +++ b/board/pcippc2/flash.c @@ -77,8 +77,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif diff --git a/board/pcs440ep/pcs440ep.c b/board/pcs440ep/pcs440ep.c index f66f3f233e..21405829d0 100644 --- a/board/pcs440ep/pcs440ep.c +++ b/board/pcs440ep/pcs440ep.c @@ -491,8 +491,8 @@ int misc_init_r (void) /* Env protection ON by default */ (void)flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[1]); pcs440ep_readinputs (); diff --git a/board/pleb2/flash.c b/board/pleb2/flash.c index 5a1eba6b3f..3f01921bd4 100644 --- a/board/pleb2/flash.c +++ b/board/pleb2/flash.c @@ -23,7 +23,7 @@ #include <common.h> #include <mpc8xx.h> -/* environment.h defines the various CFG_ENV_... values in terms +/* environment.h defines the various CONFIG_ENV_... values in terms * of whichever ones are given in the configuration file. */ #include <environment.h> @@ -107,16 +107,16 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#ifdef CFG_ENV_ADDR +#ifdef CONFIG_ENV_ADDR flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/pm520/flash.c b/board/pm520/flash.c index c899ad3404..9ec843e11e 100644 --- a/board/pm520/flash.c +++ b/board/pm520/flash.c @@ -121,8 +121,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); #endif flash_afterinit(flash_info[0].start[0], flash_info[0].size); diff --git a/board/pm826/flash.c b/board/pm826/flash.c index e8e02893d7..bd6d7d988b 100644 --- a/board/pm826/flash.c +++ b/board/pm826/flash.c @@ -144,13 +144,13 @@ unsigned long flash_init (void) # endif #endif /* CONFIG_BOOT_ROM */ -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return (size_b0); diff --git a/board/pm828/flash.c b/board/pm828/flash.c index 0620ea3106..2e92c11f1e 100644 --- a/board/pm828/flash.c +++ b/board/pm828/flash.c @@ -144,13 +144,13 @@ unsigned long flash_init (void) # endif #endif /* CONFIG_BOOT_ROM */ -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return (size_b0); diff --git a/board/ppmc7xx/flash.c b/board/ppmc7xx/flash.c index dd91da7d72..1722a35c95 100644 --- a/board/ppmc7xx/flash.c +++ b/board/ppmc7xx/flash.c @@ -197,13 +197,13 @@ unsigned long flash_init (void) CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return (size_b0); diff --git a/board/prodrive/pdnb3/flash.c b/board/prodrive/pdnb3/flash.c index 0786324fba..5738c5bd04 100644 --- a/board/prodrive/pdnb3/flash.c +++ b/board/prodrive/pdnb3/flash.c @@ -71,14 +71,14 @@ unsigned long flash_init(void) /* Environment protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); /* Redundant environment protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); flash_info[0].size = size; diff --git a/board/purple/flash.c b/board/purple/flash.c index ee8a60e1be..640bc293e7 100644 --- a/board/purple/flash.c +++ b/board/purple/flash.c @@ -240,9 +240,9 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, - flash_get_info(CFG_ENV_ADDR)); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, + flash_get_info(CONFIG_ENV_ADDR)); #endif return size; diff --git a/board/r360mpi/flash.c b/board/r360mpi/flash.c index 398e7342a7..8145437b1a 100644 --- a/board/r360mpi/flash.c +++ b/board/r360mpi/flash.c @@ -32,14 +32,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -114,8 +114,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/rmu/flash.c b/board/rmu/flash.c index 670faf0931..7c248a7ba2 100644 --- a/board/rmu/flash.c +++ b/board/rmu/flash.c @@ -84,19 +84,19 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif -#if defined(CFG_ENV_ADDR_REDUND) || defined(CFG_ENV_OFFSET_REDUND) +#if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND) debug ("Protect redundand environment: %08lx ... %08lx\n", - (ulong)CFG_ENV_ADDR_REDUND, - (ulong)CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE - 1); + (ulong)CONFIG_ENV_ADDR_REDUND, + (ulong)CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE - 1); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/rpxsuper/flash.c b/board/rpxsuper/flash.c index 2d176947af..5f444bf993 100644 --- a/board/rpxsuper/flash.c +++ b/board/rpxsuper/flash.c @@ -71,13 +71,13 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/rsdproto/flash.c b/board/rsdproto/flash.c index f9544580cf..312b4001d0 100644 --- a/board/rsdproto/flash.c +++ b/board/rsdproto/flash.c @@ -131,17 +131,17 @@ unsigned long flash_init (void) &flash_info[1]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[1]); #endif diff --git a/board/sacsng/flash.c b/board/sacsng/flash.c index f37be29423..8fecf95900 100644 --- a/board/sacsng/flash.c +++ b/board/sacsng/flash.c @@ -27,11 +27,11 @@ #undef DEBUG -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif -#ifndef CFG_ENV_SIZE -#define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#ifndef CONFIG_ENV_SIZE +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #endif @@ -76,8 +76,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif @@ -93,8 +93,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/sandpoint/flash.c b/board/sandpoint/flash.c index 60cb1915e5..0f3eca2cde 100644 --- a/board/sandpoint/flash.c +++ b/board/sandpoint/flash.c @@ -33,14 +33,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -230,10 +230,10 @@ flash_init(void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/sbc2410x/flash.c b/board/sbc2410x/flash.c index 0c669e4d76..fa3996ddcf 100644 --- a/board/sbc2410x/flash.c +++ b/board/sbc2410x/flash.c @@ -114,8 +114,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/sbc8260/flash.c b/board/sbc8260/flash.c index 6d659b2d58..d3b1f310d7 100644 --- a/board/sbc8260/flash.c +++ b/board/sbc8260/flash.c @@ -67,13 +67,13 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif diff --git a/board/sc520_cdp/flash.c b/board/sc520_cdp/flash.c index d52a847c73..493d51aca2 100644 --- a/board/sc520_cdp/flash.c +++ b/board/sc520_cdp/flash.c @@ -276,10 +276,10 @@ ulong flash_init(void) i386boot_start, i386boot_end, &flash_info[0]); -#ifdef CFG_ENV_ADDR +#ifdef CONFIG_ENV_ADDR flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return size; diff --git a/board/sc520_cdp/flash_old.c b/board/sc520_cdp/flash_old.c index 3c0f6d6a68..b68626e154 100644 --- a/board/sc520_cdp/flash_old.c +++ b/board/sc520_cdp/flash_old.c @@ -119,10 +119,10 @@ ulong flash_init(void) i386boot_end-SC520_FLASH_BANK0_BASE, &flash_info[0]); -#ifdef CFG_ENV_ADDR +#ifdef CONFIG_ENV_ADDR flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return size; diff --git a/board/sc520_spunk/flash.c b/board/sc520_spunk/flash.c index 0b4bf68894..609cc42d6b 100644 --- a/board/sc520_spunk/flash.c +++ b/board/sc520_spunk/flash.c @@ -323,10 +323,10 @@ ulong flash_init(void) i386boot_start, i386boot_end, &flash_info[0]); -#ifdef CFG_ENV_ADDR +#ifdef CONFIG_ENV_ADDR flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return size; diff --git a/board/scb9328/flash.c b/board/scb9328/flash.c index 304190cbf6..536725af20 100644 --- a/board/scb9328/flash.c +++ b/board/scb9328/flash.c @@ -142,8 +142,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return SCB9328_FLASH_BANK_SIZE; } diff --git a/board/shannon/flash.c b/board/shannon/flash.c index 475b76b30b..7d6eca8bba 100644 --- a/board/shannon/flash.c +++ b/board/shannon/flash.c @@ -128,8 +128,8 @@ ulong flash_init(void) &flash_info[0]); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return size; diff --git a/board/siemens/SCM/flash.c b/board/siemens/SCM/flash.c index 815f0236d1..500af923ac 100644 --- a/board/siemens/SCM/flash.c +++ b/board/siemens/SCM/flash.c @@ -207,13 +207,13 @@ unsigned long flash_init (void) CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return (size_b0); diff --git a/board/siemens/SMN42/flash.c b/board/siemens/SMN42/flash.c index 7d4977e026..ae64096f81 100644 --- a/board/siemens/SMN42/flash.c +++ b/board/siemens/SMN42/flash.c @@ -70,8 +70,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); size += ext_flash_init(); diff --git a/board/siemens/pcu_e/flash.c b/board/siemens/pcu_e/flash.c index 5b812cb365..97b511e4d8 100644 --- a/board/siemens/pcu_e/flash.c +++ b/board/siemens/pcu_e/flash.c @@ -25,14 +25,14 @@ #include <mpc8xx.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -154,8 +154,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif @@ -181,8 +181,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[1]); #endif /* diff --git a/board/sixnet/flash.c b/board/sixnet/flash.c index 61d758085c..3f2329966a 100644 --- a/board/sixnet/flash.c +++ b/board/sixnet/flash.c @@ -23,7 +23,7 @@ #include <common.h> #include <mpc8xx.h> -/* environment.h defines the various CFG_ENV_... values in terms +/* environment.h defines the various CONFIG_ENV_... values in terms * of whichever ones are given in the configuration file. */ #include <environment.h> @@ -108,16 +108,16 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#ifdef CFG_ENV_ADDR +#ifdef CONFIG_ENV_ADDR flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/sl8245/flash.c b/board/sl8245/flash.c index f41dde0589..c787bfb94f 100644 --- a/board/sl8245/flash.c +++ b/board/sl8245/flash.c @@ -26,14 +26,14 @@ #include <asm/processor.h> #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -139,15 +139,15 @@ unsigned long flash_init (void) #endif #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -#if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +#if CONFIG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[1]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[1]); #else flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif #endif diff --git a/board/smdk2400/flash.c b/board/smdk2400/flash.c index fd9992d366..af46bf6780 100644 --- a/board/smdk2400/flash.c +++ b/board/smdk2400/flash.c @@ -97,13 +97,13 @@ ulong flash_init (void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/smdk2410/flash.c b/board/smdk2410/flash.c index 376930bd3c..32ae80d8aa 100644 --- a/board/smdk2410/flash.c +++ b/board/smdk2410/flash.c @@ -116,8 +116,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return size; } diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 73a2d9d709..cdab1a2231 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -126,14 +126,14 @@ int misc_init_r (void) /* Environment protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); /* Redundant environment protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); } diff --git a/board/ssv/adnpesc1/flash.c b/board/ssv/adnpesc1/flash.c index fd8379b1b8..261406885e 100644 --- a/board/ssv/adnpesc1/flash.c +++ b/board/ssv/adnpesc1/flash.c @@ -36,7 +36,7 @@ /*---------------------------------------------------------------------*/ #define BANKSZ (8 * 1024 * 1024) #define SECTSZ (64 * 1024) -#define UBOOTSECS ((CFG_MONITOR_LEN + CFG_ENV_SIZE) / SECTSZ) +#define UBOOTSECS ((CFG_MONITOR_LEN + CONFIG_ENV_SIZE) / SECTSZ) #define UBOOTAREA (UBOOTSECS * 64 * 1024) /* monitor / env area */ /*---------------------------------------------------------------------*/ diff --git a/board/stxgp3/flash.c b/board/stxgp3/flash.c index 25ac3012c6..1433491dc4 100644 --- a/board/stxgp3/flash.c +++ b/board/stxgp3/flash.c @@ -42,14 +42,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -102,8 +102,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif #endif diff --git a/board/svm_sc8xx/flash.c b/board/svm_sc8xx/flash.c index 267be78f66..00fed59f25 100644 --- a/board/svm_sc8xx/flash.c +++ b/board/svm_sc8xx/flash.c @@ -23,8 +23,8 @@ #include <common.h> #include <mpc8xx.h> -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -155,8 +155,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[0]); #endif @@ -182,8 +182,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/tqc/tqm5200/cam5200_flash.c b/board/tqc/tqm5200/cam5200_flash.c index bb12aaea4c..4fc4dc6c4e 100644 --- a/board/tqc/tqm5200/cam5200_flash.c +++ b/board/tqc/tqm5200/cam5200_flash.c @@ -769,12 +769,12 @@ unsigned long flash_init(void) CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1, &flash_info[i]); #if defined(CONFIG_ENV_IS_IN_FLASH) - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); -#if defined(CFG_ENV_ADDR_REDUND) - (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, +#if defined(CONFIG_ENV_ADDR_REDUND) + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[i]); #endif #endif diff --git a/board/tqc/tqm8260/flash.c b/board/tqc/tqm8260/flash.c index 815f0236d1..500af923ac 100644 --- a/board/tqc/tqm8260/flash.c +++ b/board/tqc/tqm8260/flash.c @@ -207,13 +207,13 @@ unsigned long flash_init (void) CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif return (size_b0); diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c index 0e5bc2f730..5314d3399c 100644 --- a/board/tqc/tqm85xx/tqm85xx.c +++ b/board/tqc/tqm85xx/tqm85xx.c @@ -321,15 +321,15 @@ int misc_init_r (void) /* Environment protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND /* Redundant environment protection ON by default */ flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[CFG_MAX_FLASH_BANKS - 1]); #endif diff --git a/board/tqc/tqm8xx/flash.c b/board/tqc/tqm8xx/flash.c index f9078cffd9..ca35e916ad 100644 --- a/board/tqc/tqm8xx/flash.c +++ b/board/tqc/tqm8xx/flash.c @@ -43,8 +43,8 @@ DECLARE_GLOBAL_DATA_PTR; # endif #endif /* CONFIG_TQM8xxL/M, !TQM866M, !TQM885D */ -#ifndef CFG_ENV_ADDR -#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +#ifndef CONFIG_ENV_ADDR +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) #endif flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -178,30 +178,30 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ -# ifdef CFG_ENV_ADDR_REDUND +# ifdef CONFIG_ENV_ADDR_REDUND debug ("Protect primary environment: %08lx ... %08lx\n", - (ulong)CFG_ENV_ADDR, - (ulong)CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1); + (ulong)CONFIG_ENV_ADDR, + (ulong)CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1); # else debug ("Protect environment: %08lx ... %08lx\n", - (ulong)CFG_ENV_ADDR, - (ulong)CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1); + (ulong)CONFIG_ENV_ADDR, + (ulong)CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1); # endif flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND debug ("Protect redundand environment: %08lx ... %08lx\n", - (ulong)CFG_ENV_ADDR_REDUND, - (ulong)CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1); + (ulong)CONFIG_ENV_ADDR_REDUND, + (ulong)CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1); flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); #endif @@ -232,8 +232,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/trab/flash.c b/board/trab/flash.c index 3e8f105a03..08723bd299 100644 --- a/board/trab/flash.c +++ b/board/trab/flash.c @@ -107,13 +107,13 @@ ulong flash_init (void) &flash_info[0]); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); -#ifdef CFG_ENV_ADDR_REDUND +#ifdef CONFIG_ENV_ADDR_REDUND flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE_REDUND - 1, &flash_info[0]); #endif diff --git a/board/utx8245/flash.c b/board/utx8245/flash.c index 515d8c2cee..5aab8862ca 100644 --- a/board/utx8245/flash.c +++ b/board/utx8245/flash.c @@ -34,14 +34,14 @@ #define ROM_CS1_START 0xFF000000 #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -169,9 +169,9 @@ unsigned long flash_init (void) &flash_info[0]); #endif -#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR) - flash_protect (FLAG_PROTECT_SET, CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); +#if defined(CONFIG_ENV_IS_IN_FLASH) && defined(CONFIG_ENV_ADDR) + flash_protect (FLAG_PROTECT_SET, CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); #endif Done: diff --git a/board/wepep250/flash.c b/board/wepep250/flash.c index e2e08f742d..6223ec19c1 100644 --- a/board/wepep250/flash.c +++ b/board/wepep250/flash.c @@ -142,8 +142,8 @@ ulong flash_init (void) &flash_info[0]); flash_protect (FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]); return WEP_FLASH_BANK_SIZE; } diff --git a/board/westel/amx860/flash.c b/board/westel/amx860/flash.c index 4d468d314d..7768e2d85a 100644 --- a/board/westel/amx860/flash.c +++ b/board/westel/amx860/flash.c @@ -27,14 +27,14 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ #if defined(CONFIG_ENV_IS_IN_FLASH) -# ifndef CFG_ENV_ADDR -# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET) +# ifndef CONFIG_ENV_ADDR +# define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CONFIG_ENV_OFFSET) # endif -# ifndef CFG_ENV_SIZE -# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +# ifndef CONFIG_ENV_SIZE +# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE # endif -# ifndef CFG_ENV_SECT_SIZE -# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE +# ifndef CONFIG_ENV_SECT_SIZE +# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE # endif #endif @@ -137,8 +137,8 @@ unsigned long flash_init (void) #ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[0]); #endif @@ -169,8 +169,8 @@ unsigned long flash_init (void) # ifdef CONFIG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR+CFG_ENV_SECT_SIZE-1, + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR+CONFIG_ENV_SECT_SIZE-1, &flash_info[1]); #endif } else { diff --git a/board/xaeniax/flash.c b/board/xaeniax/flash.c index 9874a14fb3..cd257df5ba 100644 --- a/board/xaeniax/flash.c +++ b/board/xaeniax/flash.c @@ -90,8 +90,8 @@ unsigned long flash_init (void) &flash_info[0] ); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; } diff --git a/board/xilinx/xilinx_iic/iic_adapter.c b/board/xilinx/xilinx_iic/iic_adapter.c index 5d84ca7941..ad19ade06c 100644 --- a/board/xilinx/xilinx_iic/iic_adapter.c +++ b/board/xilinx/xilinx_iic/iic_adapter.c @@ -221,7 +221,7 @@ read_crc(uchar * buffer, int len) u8 pre; /* previous EEPROM data bit */ int i, loc; - addr = CFG_ENV_OFFSET; /* start from first env address */ + addr = CONFIG_ENV_OFFSET; /* start from first env address */ n = 0; pre = 1; stop = 1; @@ -229,7 +229,7 @@ read_crc(uchar * buffer, int len) /* calculate runtime CRC according to ML300 and read back old CRC stored in the EEPROM */ - while (n < CFG_ENV_SIZE) { + while (n < CONFIG_ENV_SIZE) { receive(addr, buffer, len); /* found two null chars, end of env */ @@ -270,7 +270,7 @@ read_crc(uchar * buffer, int len) crc = 0; n = 0; addr = - CFG_ENV_OFFSET - offsetof(env_t, crc) + offsetof(env_t, + CONFIG_ENV_OFFSET - offsetof(env_t, crc) + offsetof(env_t, data); /* calculate u-boot crc */ while (n < ENV_SIZE) { @@ -464,7 +464,7 @@ save_env(void) /* update EEPROM env values if there is enough space */ if (update_crc(len, (uchar *)eprom) == 0) - send(CFG_ENV_OFFSET, (uchar *)eprom, len + 6); + send(CONFIG_ENV_OFFSET, (uchar *)eprom, len + 6); } /************************************************************************ @@ -483,7 +483,7 @@ i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len) /* then read out EEPROM content for runtime u-boot CRC calculation */ receive(addr, buffer, len); - if (addr + len - CFG_ENV_OFFSET == CFG_ENV_SIZE) + if (addr + len - CONFIG_ENV_OFFSET == CONFIG_ENV_SIZE) /* end of runtime crc read */ ++envStep; return 0; @@ -492,7 +492,7 @@ i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len) if (len < 2) { /* when call getenv_r */ receive(addr, buffer, len); - } else if (addr + len < CFG_ENV_OFFSET + CFG_ENV_SIZE) { + } else if (addr + len < CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) { /* calling env_relocate(), but don't read out crc value from EEPROM */ receive(addr, buffer + 4, len); @@ -511,7 +511,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar * buffer, int len) { /* save env on last page write called by u-boot */ - if (addr + len >= CFG_ENV_OFFSET + CFG_ENV_SIZE) + if (addr + len >= CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) save_env(); return 0; diff --git a/board/xm250/flash.c b/board/xm250/flash.c index aab47a0a55..893351eea3 100644 --- a/board/xm250/flash.c +++ b/board/xm250/flash.c @@ -109,8 +109,8 @@ unsigned long flash_init (void) &flash_info[0] ); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; } diff --git a/board/xsengine/flash.c b/board/xsengine/flash.c index a188e24408..f29def268d 100644 --- a/board/xsengine/flash.c +++ b/board/xsengine/flash.c @@ -62,7 +62,7 @@ unsigned long flash_init (void) /* Protect monitor and environment sectors */ flash_protect ( FLAG_PROTECT_SET,CFG_FLASH_BASE,CFG_FLASH_BASE + monitor_flash_len - 1,&flash_info[0] ); - flash_protect ( FLAG_PROTECT_SET,CFG_ENV_ADDR,CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + flash_protect ( FLAG_PROTECT_SET,CONFIG_ENV_ADDR,CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; } diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c index 33d971ab02..8e4c0e2fd7 100644 --- a/board/zeus/zeus.c +++ b/board/zeus/zeus.c @@ -150,8 +150,8 @@ int misc_init_r(void) /* Env protection ON by default */ (void)flash_protect(FLAG_PROTECT_SET, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); return 0; @@ -249,12 +249,12 @@ static int restore_default(void) * Unprotect and erase environment area */ flash_protect(FLAG_PROTECT_CLEAR, - CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1, + CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1, &flash_info[0]); - flash_sect_erase(CFG_ENV_ADDR_REDUND, - CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1); + flash_sect_erase(CONFIG_ENV_ADDR_REDUND, + CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1); /* * Now restore default environment from U-Boot image diff --git a/board/zylonite/flash.c b/board/zylonite/flash.c index 883c1ba3b3..80b520b976 100644 --- a/board/zylonite/flash.c +++ b/board/zylonite/flash.c @@ -91,8 +91,8 @@ unsigned long flash_init (void) &flash_info[0] ); flash_protect ( FLAG_PROTECT_SET, - CFG_ENV_ADDR, - CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0] ); + CONFIG_ENV_ADDR, + CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0] ); return size; #endif |