[U-Boot-Users] [PATCH 13/30] lib_{arm, avr32, blackfin, generic, i386}/: Remove obsolete references to CONFIG_COMMANDS

Jon Loeliger jdl at jdl.com
Tue Jul 10 05:49:44 CEST 2007


Signed-off-by: Jon Loeliger <jdl at freescale.com>
---
 lib_arm/board.c      |    8 ++++----
 lib_avr32/board.c    |    2 +-
 lib_blackfin/board.c |    6 +++---
 lib_generic/crc32.c  |    4 ++--
 lib_i386/board.c     |   17 ++++++++---------
 5 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/lib_arm/board.c b/lib_arm/board.c
index 69d4782..e175607 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -54,7 +54,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
 void nand_init (void);
 #endif
 
@@ -296,7 +296,7 @@ void start_armboot (void)
 	/* armboot_start is defined in the board-specific linker script */
 	mem_malloc_init (_armboot_start - CFG_MALLOC_LEN);
 
-#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
 	puts ("NAND:  ");
 	nand_init();		/* go init the NAND */
 #endif
@@ -378,7 +378,7 @@ void start_armboot (void)
 	if ((s = getenv ("loadaddr")) != NULL) {
 		load_addr = simple_strtoul (s, NULL, 16);
 	}
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 	if ((s = getenv ("bootfile")) != NULL) {
 		copy_filename (BootFile, s, sizeof (BootFile));
 	}
@@ -387,7 +387,7 @@ void start_armboot (void)
 #ifdef BOARD_LATE_INIT
 	board_late_init ();
 #endif
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
 	puts ("Net:   ");
 #endif
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 822668c..8b9ca38 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -328,7 +328,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
 	jumptable_init();
 	console_init_r();
 
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
 	puts("Net:   ");
 #endif
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index d359710..36a969e 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -297,7 +297,7 @@ void board_init_f(ulong bootflag)
 	}
 
 	checkboard();
-#if defined(CONFIG_RTC_BF533) && ((CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE))
+#if defined(CONFIG_RTC_BF533) && defined(CONFIG_CMD_DATE)
 	rtc_init();
 #endif
 	timer_init();
@@ -391,13 +391,13 @@ void board_init_r(gd_t * id, ulong dest_addr)
 	if ((s = getenv("loadaddr")) != NULL) {
 		load_addr = simple_strtoul(s, NULL, 16);
 	}
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 	if ((s = getenv("bootfile")) != NULL) {
 		copy_filename(BootFile, s, sizeof(BootFile));
 	}
 #endif
 
-#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
 	puts("NAND:  ");
 	nand_init();		/* go init the NAND */
 #endif
diff --git a/lib_generic/crc32.c b/lib_generic/crc32.c
index 84deba9..da23336 100644
--- a/lib_generic/crc32.c
+++ b/lib_generic/crc32.c
@@ -171,8 +171,8 @@ uLong ZEXPORT crc32(crc, buf, len)
     return crc ^ 0xffffffffL;
 }
 
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) || \
-	(((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) \
+#if defined(CONFIG_CMD_JFFS2) || \
+	(defined(CONFIG_CMD_NAND) \
 	&& !defined(CFG_NAND_LEGACY))
 
 /* No ones complement version. JFFS2 (and other things ?)
diff --git a/lib_i386/board.c b/lib_i386/board.c
index 1efe81e..667d2da 100644
--- a/lib_i386/board.c
+++ b/lib_i386/board.c
@@ -313,14 +313,13 @@ void start_i386boot (void)
 	misc_init_r();
 #endif
 
-#if ((CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA))
-	&& !((CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE))
+#if defined(CONFIG_CMD_PCMCIA) && !defined(CONFIG_CMD_IDE)
 	WATCHDOG_RESET();
 	puts ("PCMCIA:");
 	pcmcia_init();
 #endif
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB) || defined(CONFIG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
 	WATCHDOG_RESET();
 	puts("KGDB:  ");
 	kgdb_init();
@@ -349,7 +348,7 @@ void start_i386boot (void)
 	if ((s = getenv ("loadaddr")) != NULL) {
 		load_addr = simple_strtoul (s, NULL, 16);
 	}
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 	if ((s = getenv ("bootfile")) != NULL) {
 		copy_filename (BootFile, s, sizeof (BootFile));
 	}
@@ -357,25 +356,25 @@ void start_i386boot (void)
 
 	WATCHDOG_RESET();
 
-#if (CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE)
+#if defined(CONFIG_CMD_IDE)
 	WATCHDOG_RESET();
 	puts("IDE:   ");
 	ide_init();
 #endif /* CFG_CMD_IDE */
 
-#if (CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI)
+#if defined(CONFIG_CMD_SCSI)
 	WATCHDOG_RESET();
 	puts("SCSI:  ");
 	scsi_init();
 #endif
 
-#if (CONFIG_COMMANDS & CFG_CMD_DOC) || defined(CONFIG_CMD_DOC)
+#if defined(CONFIG_CMD_DOC)
 	WATCHDOG_RESET();
 	puts("DOC:   ");
 	doc_init();
 #endif
 
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
 	WATCHDOG_RESET();
 	puts("Net:   ");
@@ -383,7 +382,7 @@ void start_i386boot (void)
 	eth_initialize(gd->bd);
 #endif
 
-#if ((CONFIG_COMMANDS & CFG_CMD_NET)  || defined(CONFIG_CMD_NET)) && (0)
+#if ( defined(CONFIG_CMD_NET)) && (0)
 	WATCHDOG_RESET();
 # ifdef DEBUG
 	puts ("Reset Ethernet PHY\n");
-- 
1.5.2.2.249.g45fd





More information about the U-Boot mailing list