[U-Boot-Users] [PATCH] Fix remaining CONFIG_COMMANDS
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Wed Jan 23 23:54:34 CET 2008
update comments
Fix coding style
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
diff --git a/api/api_storage.c b/api/api_storage.c
index 7cd4efb..7e63240 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -61,21 +61,21 @@ static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, "" }, };
void dev_stor_init(void)
{
-#if (CONFIG_COMMANDS & CFG_CMD_IDE)
+#if defined(CONFIG_CMD_IDE)
specs[ENUM_IDE].max_dev = CFG_IDE_MAXDEVICE;
specs[ENUM_IDE].enum_started = 0;
specs[ENUM_IDE].enum_ended = 0;
specs[ENUM_IDE].type = DEV_TYP_STOR | DT_STOR_IDE;
specs[ENUM_IDE].name = "ide";
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_USB)
+#if defined(CONFIG_CMD_USB)
specs[ENUM_USB].max_dev = USB_MAX_STOR_DEV;
specs[ENUM_USB].enum_started = 0;
specs[ENUM_USB].enum_ended = 0;
specs[ENUM_USB].type = DEV_TYP_STOR | DT_STOR_USB;
specs[ENUM_USB].name = "usb";
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_SCSI)
+#if defined(CONFIG_CMD_SCSI)
specs[ENUM_SCSI].max_dev = CFG_SCSI_MAX_DEVICE;
specs[ENUM_SCSI].enum_started = 0;
specs[ENUM_SCSI].enum_ended = 0;
diff --git a/board/BuS/EB+MCF-EV123/mii.c b/board/BuS/EB+MCF-EV123/mii.c
index ebd3ed9..5182792 100644
--- a/board/BuS/EB+MCF-EV123/mii.c
+++ b/board/BuS/EB+MCF-EV123/mii.c
@@ -132,7 +132,7 @@ uint mii_send(uint mii_cmd)
return (mii_reply & 0xffff); /* data read from phy */
}
-#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
+#endif /* CFG_DISCOVER_PHY || CONFIG_CMD_MII) */
#if defined(CFG_DISCOVER_PHY)
int mii_discover_phy(struct eth_device *dev)
diff --git a/board/amcc/kilauea/cmd_pll.c b/board/amcc/kilauea/cmd_pll.c
index b2666dd..0f480b9 100644
--- a/board/amcc/kilauea/cmd_pll.c
+++ b/board/amcc/kilauea/cmd_pll.c
@@ -294,4 +294,4 @@ U_BOOT_CMD(
-----------------------------------------------\n"
);
-#endif /* (CONFIG_COMMANDS & CFG_CMD_EEPROM) */
+#endif /* (CONFIG_CMD_EEPROM) */
diff --git a/board/amcc/makalu/cmd_pll.c b/board/amcc/makalu/cmd_pll.c
index b2666dd..0f480b9 100644
--- a/board/amcc/makalu/cmd_pll.c
+++ b/board/amcc/makalu/cmd_pll.c
@@ -294,4 +294,4 @@ U_BOOT_CMD(
-----------------------------------------------\n"
);
-#endif /* (CONFIG_COMMANDS & CFG_CMD_EEPROM) */
+#endif /* (CONFIG_CMD_EEPROM) */
diff --git a/board/cobra5272/mii.c b/board/cobra5272/mii.c
index fadcbb3..9ca2902 100644
--- a/board/cobra5272/mii.c
+++ b/board/cobra5272/mii.c
@@ -131,7 +131,7 @@ uint mii_send(uint mii_cmd)
return (mii_reply & 0xffff); /* data read from phy */
}
-#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
+#endif /* CFG_DISCOVER_PHY || (CONFIG_CMD_MII) */
#if defined(CFG_DISCOVER_PHY)
int mii_discover_phy(struct eth_device *dev)
diff --git a/board/idmr/mii.c b/board/idmr/mii.c
index f6c63c3..706c90f 100644
--- a/board/idmr/mii.c
+++ b/board/idmr/mii.c
@@ -131,7 +131,7 @@ uint mii_send(uint mii_cmd)
return (mii_reply & 0xffff); /* data read from phy */
}
-#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
+#endif /* CFG_DISCOVER_PHY || (CONFIG_CMD_MII) */
#if defined(CFG_DISCOVER_PHY)
int mii_discover_phy(struct eth_device *dev)
diff --git a/board/m5271evb/mii.c b/board/m5271evb/mii.c
index 3830ce7..57562e6 100644
--- a/board/m5271evb/mii.c
+++ b/board/m5271evb/mii.c
@@ -131,7 +131,7 @@ uint mii_send(uint mii_cmd)
return (mii_reply & 0xffff); /* data read from phy */
}
-#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
+#endif /* CFG_DISCOVER_PHY || (CONFIG_CMD_MII) */
#if defined(CFG_DISCOVER_PHY)
int mii_discover_phy(struct eth_device *dev)
diff --git a/board/m5272c3/mii.c b/board/m5272c3/mii.c
index 0ecc44a..22b195a 100644
--- a/board/m5272c3/mii.c
+++ b/board/m5272c3/mii.c
@@ -131,7 +131,7 @@ uint mii_send(uint mii_cmd)
return (mii_reply & 0xffff); /* data read from phy */
}
-#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
+#endif /* CFG_DISCOVER_PHY || (CONFIG_CMD_MII) */
#if defined(CFG_DISCOVER_PHY)
int mii_discover_phy(struct eth_device *dev)
diff --git a/board/m5282evb/mii.c b/board/m5282evb/mii.c
index d7c6d1f..09d17ca 100644
--- a/board/m5282evb/mii.c
+++ b/board/m5282evb/mii.c
@@ -132,7 +132,7 @@ uint mii_send(uint mii_cmd)
return (mii_reply & 0xffff); /* data read from phy */
}
-#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
+#endif /* CFG_DISCOVER_PHY || (CONFIG_CMD_MII) */
#if defined(CFG_DISCOVER_PHY)
int mii_discover_phy(struct eth_device *dev)
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 80c4ba2..c966f7a 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -317,6 +317,6 @@ int cs8900_e2prom_write(unsigned char addr, unsigned short value)
return 0;
}
-#endif /* COMMANDS & CFG_NET */
+#endif /*CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_CS8900 */
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index ecdcbd9..51cfb7e 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -36,12 +36,12 @@
* AUI/TP selection ( mine has 10Base2/10BaseT select )
*
* Arguments:
- * io = for the base address
+ * io = for the base address
* irq = for the IRQ
*
* author:
- * Erik Stahlman ( erik at vt.edu )
- * Daris A Nevil ( dnevil at snmc.com )
+ * Erik Stahlman ( erik at vt.edu )
+ * Daris A Nevil ( dnevil at snmc.com )
*
*
* Hardware multicast code from Peter Cammaert ( pc at denkart.be )
@@ -53,7 +53,7 @@
* o lan91c96.c (Intel Diagnostic Manager driver)
*
* History:
- * 04/30/03 Mathijs Haarman Modified smc91111.c (u-boot version)
+ * 04/30/03 Mathijs Haarman Modified smc91111.c (u-boot version)
* for lan91c96
*---------------------------------------------------------------------------
*/
@@ -296,8 +296,8 @@ static int poll4int (byte mask, int timeout)
/*
* Function: smc_reset( void )
* Purpose:
- * This sets the SMC91111 chip to its normal state, hopefully from whatever
- * mess that any other DOS driver has put it in.
+ * This sets the SMC91111 chip to its normal state, hopefully from whatever
+ * mess that any other DOS driver has put it in.
*
* Maybe I should reset more registers to defaults in here? SOFTRST should
* do that for me.
@@ -397,7 +397,7 @@ static void smc_shutdown ()
* This sends the actual packet to the SMC9xxx chip.
*
* Algorithm:
- * First, see if a saved_skb is available.
+ * First, see if a saved_skb is available.
* ( this should NOT be called if there is no 'saved_skb'
* Now, find the packet number that the chip allocated
* Point the data pointers at it in memory
@@ -405,9 +405,9 @@ static void smc_shutdown ()
* Dump the packet to chip memory
* Check if a last byte is needed ( odd length packet )
* if so, set the control flag right
- * Tell the card to send it
+ * Tell the card to send it
* Enable the transmit interrupt, so I know if it failed
- * Free the kernel data if I actually sent it.
+ * Free the kernel data if I actually sent it.
*/
static int smc_send_packet (volatile void *packet, int packet_length)
{
@@ -865,7 +865,7 @@ static int smc_hw_init ()
}
#endif /* 0 */
-#endif /* COMMANDS & CFG_NET */
+#endif /* CONFIG_CMD_NET */
/* smc_get_ethaddr (bd_t * bd)
diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c
index a99ee5d..b418e08 100644
--- a/drivers/net/netarm_eth.c
+++ b/drivers/net/netarm_eth.c
@@ -355,6 +355,6 @@ extern int eth_send (volatile void *packet, int length)
return 1;
}
-#endif /* COMMANDS & CFG_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_NETARMETH */
diff --git a/drivers/net/rtl8019.c b/drivers/net/rtl8019.c
index 409a69f..d6cafba 100644
--- a/drivers/net/rtl8019.c
+++ b/drivers/net/rtl8019.c
@@ -277,6 +277,6 @@ extern int eth_send (volatile void *packet, int length)
return 0;
}
-#endif /* COMMANDS & CFG_NET */
+#endif /* CONFIG_CMD_NET */
#endif /* CONFIG_DRIVER_RTL8019 */
diff --git a/drivers/rtc/rx8025.c b/drivers/rtc/rx8025.c
index 6c94ae1..bf2c953 100644
--- a/drivers/rtc/rx8025.c
+++ b/drivers/rtc/rx8025.c
@@ -224,4 +224,4 @@ static unsigned char bin2bcd (unsigned int n)
return (((n / 10) << 4) | (n % 10));
}
-#endif /* CONFIG_RTC_RX8025 && (CFG_COMMANDS & CFG_CMD_DATE) */
+#endif /* CONFIG_RTC_RX8025 && (CONFIG_CMD_DATE) */
diff --git a/include/configs/PMC440.h b/include/configs/PMC440.h
index 67bf4b1..e8b405a 100644
--- a/include/configs/PMC440.h
+++ b/include/configs/PMC440.h
@@ -385,7 +385,7 @@
*----------------------------------------------------------------------*/
#define CFG_LONGHELP /* undef to save memory */
#define CFG_PROMPT "=> " /* Monitor Command Prompt */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
#else
#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
@@ -503,7 +503,7 @@
#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
#define BOOTFLAG_WARM 0x02 /* Software reboot */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
diff --git a/include/configs/kilauea.h b/include/configs/kilauea.h
index f3e8601..a1d1533 100644
--- a/include/configs/kilauea.h
+++ b/include/configs/kilauea.h
@@ -476,7 +476,7 @@
#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
#define BOOTFLAG_WARM 0x02 /* Software reboot */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
diff --git a/include/configs/makalu.h b/include/configs/makalu.h
index 8f8e867..2f0b0a8 100644
--- a/include/configs/makalu.h
+++ b/include/configs/makalu.h
@@ -385,7 +385,7 @@
#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
#define BOOTFLAG_WARM 0x02 /* Software reboot */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
diff --git a/include/configs/ms7720se.h b/include/configs/ms7720se.h
index 8a94c28..537afe0 100644
--- a/include/configs/ms7720se.h
+++ b/include/configs/ms7720se.h
@@ -43,9 +43,10 @@
#define CFG_CMD_PCMCIA 0x01
#define CFG_CMD_IDE 0x02
-#define CONFIG_COMMANDS ((CONFIG_CMD_DFL | \
- CFG_CMD_IDE|CFG_CMD_PCMCIA) & \
- ~(CFG_CMD_FPGA))
+#define CONFIG_CMD_DFL 1
+#define CONFIG_CMD_IDE 1
+#define CONFIG_CMD_PCMCIA 1
+#undef CONFIG_CMD_FPGA
#define CONFIG_BAUDRATE 115200
#define CONFIG_BOOTARGS "console=ttySC0,115200"
@@ -104,7 +105,7 @@
#define CFG_ENV_SECT_SIZE (64 * 1024)
#define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
#define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
-#define CFG_FLASH_ERASE_TOUT 120000
+#define CFG_FLASH_ERASE_TOUT 120000
#define CFG_FLASH_WRITE_TOUT 500
/* Board Clock */
diff --git a/include/configs/munices.h b/include/configs/munices.h
index 2372b57..38b27bb 100644
--- a/include/configs/munices.h
+++ b/include/configs/munices.h
@@ -48,7 +48,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_REGINFO
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
# define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
#endif
diff --git a/include/configs/trizepsiv.h b/include/configs/trizepsiv.h
index 84998d4..8916432 100644
--- a/include/configs/trizepsiv.h
+++ b/include/configs/trizepsiv.h
@@ -140,7 +140,7 @@
#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
/* #define CONFIG_INITRD_TAG 1 */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
@@ -315,7 +315,7 @@
/* Flash environment locations */
#define CFG_ENV_IS_IN_FLASH 1
#define CFG_ENV_ADDR (PHYS_FLASH_1 + CFG_MONITOR_LEN) /* Addr of Environment Sector */
-#define CFG_ENV_SIZE 0x40000 /* Total Size of Environment */
+#define CFG_ENV_SIZE 0x40000 /* Total Size of Environment */
#define CFG_ENV_SECT_SIZE 0x40000 /* Total Size of Environment Sector */
/* Address and size of Redundant Environment Sector */
--
1.5.3.7
More information about the U-Boot
mailing list