cleanup use of CFG_ENV_IS_IN_FLASH

- #if CFG_ENV_IS_IN_FLASH
- #if (CFG_ENV_IS_IN_FLASH == 1)
- #define CFG_ENV_IS_IN_FLASH 0

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2008-09-10 22:48:03 +02:00
parent 0cf4fd3cf8
commit 7d9b5bae5b
27 changed files with 27 additions and 27 deletions

View file

@ -224,7 +224,7 @@ unsigned long flash_init(void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
flash_protect(FLAG_PROTECT_SET,
CFG_ENV_ADDR,
CFG_ENV_ADDR + CFG_ENV_SIZE - 1,

View file

@ -224,7 +224,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
flash_protect (FLAG_PROTECT_SET,
CFG_ENV_ADDR,
CFG_ENV_ADDR + CFG_ENV_SIZE - 1,

View file

@ -174,7 +174,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
#if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE
flash_protect (FLAG_PROTECT_SET,
CFG_ENV_ADDR,

View file

@ -230,7 +230,7 @@ unsigned long flash_init (void)
#endif
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -236,7 +236,7 @@ unsigned long flash_init (void)
#endif
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -135,7 +135,7 @@ unsigned long flash_init(void)
#endif
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
#if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE
flash_protect(FLAG_PROTECT_SET,
CFG_ENV_ADDR,

View file

@ -157,7 +157,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -126,7 +126,7 @@ unsigned long flash_init (void)
#endif
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
flash_protect(FLAG_PROTECT_SET,
CFG_ENV_ADDR,
CFG_ENV_ADDR + CFG_ENV_SIZE - 1,

View file

@ -100,7 +100,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -212,7 +212,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
flash_protect (FLAG_PROTECT_SET,
CFG_ENV_ADDR,
CFG_ENV_ADDR + CFG_ENV_SIZE - 1,

View file

@ -73,7 +73,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -144,7 +144,7 @@ unsigned long flash_init (void)
# endif
#endif /* CONFIG_BOOT_ROM */
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -144,7 +144,7 @@ unsigned long flash_init (void)
# endif
#endif /* CONFIG_BOOT_ROM */
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -197,7 +197,7 @@ unsigned long flash_init (void)
CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -71,7 +71,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -131,7 +131,7 @@ unsigned long flash_init (void)
&flash_info[1]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -230,7 +230,7 @@ flash_init(void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
flash_protect(FLAG_PROTECT_SET,
CFG_ENV_ADDR,
CFG_ENV_ADDR + CFG_ENV_SIZE - 1,

View file

@ -67,7 +67,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -207,7 +207,7 @@ unsigned long flash_init (void)
CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -139,7 +139,7 @@ unsigned long flash_init (void)
#endif
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
#if CFG_ENV_ADDR >= CFG_FLASH_BASE + FLASH_BANK_SIZE
flash_protect ( FLAG_PROTECT_SET,
CFG_ENV_ADDR,

View file

@ -207,7 +207,7 @@ unsigned long flash_init (void)
CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_ENV_IS_IN_FLASH) && defined(CFG_ENV_ADDR)
# ifndef CFG_ENV_SIZE
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
# endif

View file

@ -169,7 +169,7 @@ unsigned long flash_init (void)
&flash_info[0]);
#endif
#if (CFG_ENV_IS_IN_FLASH == 1) && defined(CFG_ENV_ADDR)
#if defined(CFG_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]);
#endif

View file

@ -572,7 +572,7 @@
#define CFG_FLASH_LOCK_TOUT 500 /* Timeout for Flash Lock (in ms) */
#if 0
#define CFG_ENV_IS_IN_FLASH 0
#define CFG_ENV_IS_IN_FLASH
#define CFG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */
#define CFG_ENV_SECT_SIZE 0x10000
#define CFG_ENV_ADDR 0xFFF78000 /* Marvell 8-Bit Bootflash last sector */

View file

@ -210,7 +210,7 @@
* Environment settings
*/
#define CONFIG_ENV_IS_NOWHERE 1
/*#define CFG_ENV_IS_IN_FLASH 0*/
/*#define CFG_ENV_IS_IN_FLASH*/
/*#define CFG_ENV_SIZE 0x8000*/
#define CFG_ENV_SECT_SIZE 0x40000
#define CONFIG_ENV_OVERWRITE 1

View file

@ -207,7 +207,7 @@
* Environment settings
*/
#define CONFIG_ENV_IS_NOWHERE 1
/*#define CFG_ENV_IS_IN_FLASH 0*/
/*#define CFG_ENV_IS_IN_FLASH*/
/*#define CFG_ENV_SIZE 0x8000*/
#define CFG_ENV_SECT_SIZE 0x40000
#define CONFIG_ENV_OVERWRITE 1

View file

@ -205,7 +205,7 @@
* Environment settings
*/
#if 1 /* test-only */
#define CFG_ENV_IS_IN_FLASH 0
#define CFG_ENV_IS_IN_FLASH
#define CFG_ENV_SIZE 0x10000
#define CFG_ENV_SECT_SIZE 0x10000
#define CONFIG_ENV_OVERWRITE 1

View file

@ -405,7 +405,7 @@ extern unsigned long offsetOfEnvironment;
#define CFG_WRITE_SWAPPED_DATA /* swap Databytes between reading/writing */
#define CFG_ENV_IS_IN_FLASH 1
#if CFG_ENV_IS_IN_FLASH
#ifdef CFG_ENV_IS_IN_FLASH
#define CFG_ENV_OFFSET 0x00000000 /* Offset of Environment Sector in bottom type */
#define CFG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
#define CFG_ENV_SECT_SIZE 0x4000 /* see README - env sector total size */