aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-09-10 22:48:03 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-09-10 22:48:03 +0200
commit7d9b5bae5ba558c7464d89d033aca04acaf01172 (patch)
tree0e96ee96eb485fe32e09b3e9cf72238165c97a12
parent0cf4fd3cf8d0e00605bec5fc56f89c6415015a46 (diff)
downloadu-boot-linaro-stable-7d9b5bae5ba558c7464d89d033aca04acaf01172.tar.gz
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>
-rw-r--r--board/barco/flash.c2
-rw-r--r--board/bmw/flash.c2
-rw-r--r--board/cpc45/flash.c2
-rw-r--r--board/cpu86/flash.c2
-rw-r--r--board/cpu87/flash.c2
-rw-r--r--board/cu824/flash.c2
-rw-r--r--board/ep8260/flash.c2
-rw-r--r--board/exbitgen/flash.c2
-rw-r--r--board/gw8260/flash.c2
-rw-r--r--board/hidden_dragon/flash.c2
-rw-r--r--board/oxc/flash.c2
-rw-r--r--board/pm826/flash.c2
-rw-r--r--board/pm828/flash.c2
-rw-r--r--board/ppmc7xx/flash.c2
-rw-r--r--board/rpxsuper/flash.c2
-rw-r--r--board/rsdproto/flash.c2
-rw-r--r--board/sandpoint/flash.c2
-rw-r--r--board/sbc8260/flash.c2
-rw-r--r--board/siemens/SCM/flash.c2
-rw-r--r--board/sl8245/flash.c2
-rw-r--r--board/tqc/tqm8260/flash.c2
-rw-r--r--board/utx8245/flash.c2
-rw-r--r--include/configs/CPCI750.h2
-rw-r--r--include/configs/grsim.h2
-rw-r--r--include/configs/grsim_leon2.h2
-rw-r--r--include/configs/pf5200.h2
-rw-r--r--include/configs/sc3.h2
27 files changed, 27 insertions, 27 deletions
diff --git a/board/barco/flash.c b/board/barco/flash.c
index 6cb19b7b0..9502560d6 100644
--- a/board/barco/flash.c
+++ b/board/barco/flash.c
@@ -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,
diff --git a/board/bmw/flash.c b/board/bmw/flash.c
index 7fba174f4..6d3cfab13 100644
--- a/board/bmw/flash.c
+++ b/board/bmw/flash.c
@@ -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,
diff --git a/board/cpc45/flash.c b/board/cpc45/flash.c
index 37dd182ba..9a398686b 100644
--- a/board/cpc45/flash.c
+++ b/board/cpc45/flash.c
@@ -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,
diff --git a/board/cpu86/flash.c b/board/cpu86/flash.c
index 1535a6b48..b1048a36b 100644
--- a/board/cpu86/flash.c
+++ b/board/cpu86/flash.c
@@ -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
diff --git a/board/cpu87/flash.c b/board/cpu87/flash.c
index 076c2f919..925a0e672 100644
--- a/board/cpu87/flash.c
+++ b/board/cpu87/flash.c
@@ -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
diff --git a/board/cu824/flash.c b/board/cu824/flash.c
index 7368176e5..ec1a58633 100644
--- a/board/cu824/flash.c
+++ b/board/cu824/flash.c
@@ -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,
diff --git a/board/ep8260/flash.c b/board/ep8260/flash.c
index 966a34526..167f316c8 100644
--- a/board/ep8260/flash.c
+++ b/board/ep8260/flash.c
@@ -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
diff --git a/board/exbitgen/flash.c b/board/exbitgen/flash.c
index 4dd538287..401eead5d 100644
--- a/board/exbitgen/flash.c
+++ b/board/exbitgen/flash.c
@@ -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,
diff --git a/board/gw8260/flash.c b/board/gw8260/flash.c
index 5620a1d8b..015ea7dda 100644
--- a/board/gw8260/flash.c
+++ b/board/gw8260/flash.c
@@ -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
diff --git a/board/hidden_dragon/flash.c b/board/hidden_dragon/flash.c
index 21c5a01c1..a2ed3bd1f 100644
--- a/board/hidden_dragon/flash.c
+++ b/board/hidden_dragon/flash.c
@@ -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,
diff --git a/board/oxc/flash.c b/board/oxc/flash.c
index 296c01dc8..4559b8033 100644
--- a/board/oxc/flash.c
+++ b/board/oxc/flash.c
@@ -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
diff --git a/board/pm826/flash.c b/board/pm826/flash.c
index fee07cf35..92a433a58 100644
--- a/board/pm826/flash.c
+++ b/board/pm826/flash.c
@@ -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
diff --git a/board/pm828/flash.c b/board/pm828/flash.c
index 1f21b3e9c..0e7bfe8b0 100644
--- a/board/pm828/flash.c
+++ b/board/pm828/flash.c
@@ -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
diff --git a/board/ppmc7xx/flash.c b/board/ppmc7xx/flash.c
index 4be6f1364..4d13612af 100644
--- a/board/ppmc7xx/flash.c
+++ b/board/ppmc7xx/flash.c
@@ -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
diff --git a/board/rpxsuper/flash.c b/board/rpxsuper/flash.c
index d80e77862..b29032bc4 100644
--- a/board/rpxsuper/flash.c
+++ b/board/rpxsuper/flash.c
@@ -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
diff --git a/board/rsdproto/flash.c b/board/rsdproto/flash.c
index 4e43b2966..d9f6b3bac 100644
--- a/board/rsdproto/flash.c
+++ b/board/rsdproto/flash.c
@@ -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
diff --git a/board/sandpoint/flash.c b/board/sandpoint/flash.c
index a9f73ff0d..cf0667993 100644
--- a/board/sandpoint/flash.c
+++ b/board/sandpoint/flash.c
@@ -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,
diff --git a/board/sbc8260/flash.c b/board/sbc8260/flash.c
index 9a8b95225..c43435fc5 100644
--- a/board/sbc8260/flash.c
+++ b/board/sbc8260/flash.c
@@ -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
diff --git a/board/siemens/SCM/flash.c b/board/siemens/SCM/flash.c
index 056fe810b..063972db5 100644
--- a/board/siemens/SCM/flash.c
+++ b/board/siemens/SCM/flash.c
@@ -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
diff --git a/board/sl8245/flash.c b/board/sl8245/flash.c
index 553dc9822..7fb94631c 100644
--- a/board/sl8245/flash.c
+++ b/board/sl8245/flash.c
@@ -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,
diff --git a/board/tqc/tqm8260/flash.c b/board/tqc/tqm8260/flash.c
index 056fe810b..063972db5 100644
--- a/board/tqc/tqm8260/flash.c
+++ b/board/tqc/tqm8260/flash.c
@@ -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
diff --git a/board/utx8245/flash.c b/board/utx8245/flash.c
index 199f619a8..ae0e659c2 100644
--- a/board/utx8245/flash.c
+++ b/board/utx8245/flash.c
@@ -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
diff --git a/include/configs/CPCI750.h b/include/configs/CPCI750.h
index 4818aede3..48f308c76 100644
--- a/include/configs/CPCI750.h
+++ b/include/configs/CPCI750.h
@@ -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 */
diff --git a/include/configs/grsim.h b/include/configs/grsim.h
index c6d366607..a23ac9ca4 100644
--- a/include/configs/grsim.h
+++ b/include/configs/grsim.h
@@ -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
diff --git a/include/configs/grsim_leon2.h b/include/configs/grsim_leon2.h
index 945a163fb..c45b258bd 100644
--- a/include/configs/grsim_leon2.h
+++ b/include/configs/grsim_leon2.h
@@ -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
diff --git a/include/configs/pf5200.h b/include/configs/pf5200.h
index 4ed8a212b..a709d0ed6 100644
--- a/include/configs/pf5200.h
+++ b/include/configs/pf5200.h
@@ -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
diff --git a/include/configs/sc3.h b/include/configs/sc3.h
index 659f74ed9..4205f46e5 100644
--- a/include/configs/sc3.h
+++ b/include/configs/sc3.h
@@ -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 */