summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/bedbug.c4
-rw-r--r--common/cmd_autoscript.c9
-rw-r--r--common/cmd_bdinfo.c2
-rw-r--r--common/cmd_bedbug.c2
-rw-r--r--common/cmd_bmp.c4
-rw-r--r--common/cmd_bootm.c22
-rw-r--r--common/cmd_cache.c2
-rw-r--r--common/cmd_console.c2
-rw-r--r--common/cmd_date.c2
-rw-r--r--common/cmd_dcr.c2
-rw-r--r--common/cmd_diag.c2
-rw-r--r--common/cmd_display.c2
-rw-r--r--common/cmd_doc.c4
-rw-r--r--common/cmd_dtt.c4
-rw-r--r--common/cmd_eeprom.c8
-rw-r--r--common/cmd_elf.c4
-rw-r--r--common/cmd_ext2.c6
-rw-r--r--common/cmd_fat.c2
-rw-r--r--common/cmd_fdc.c17
-rw-r--r--common/cmd_fdos.c4
-rw-r--r--common/cmd_flash.c14
-rw-r--r--common/cmd_fpga.c6
22 files changed, 61 insertions, 63 deletions
diff --git a/common/bedbug.c b/common/bedbug.c
index 1a793f8268d..3bf1fc3cc7f 100644
--- a/common/bedbug.c
+++ b/common/bedbug.c
@@ -2,7 +2,7 @@
#include <common.h>
-#if (CONFIG_COMMANDS & CFG_CMD_BEDBUG) || defined(CONFIG_CMD_BEDBUG)
+#if defined(CONFIG_CMD_BEDBUG)
#include <linux/ctype.h>
#include <bedbug/bedbug.h>
@@ -1253,4 +1253,4 @@ int find_next_address (unsigned char *nextaddr, int step_over,
* purpose.
*/
-#endif /* CONFIG_COMMANDS & CFG_CMD_BEDBUG */
+#endif
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
index aaca3622bdc..606fb9a1fc4 100644
--- a/common/cmd_autoscript.c
+++ b/common/cmd_autoscript.c
@@ -47,8 +47,7 @@
#include <hush.h>
#endif
-#if defined(CONFIG_AUTOSCRIPT) || \
- (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
+#if defined(CONFIG_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
extern image_header_t header; /* from cmd_bootm.c */
int
@@ -152,7 +151,7 @@ autoscript (ulong addr)
#endif /* CONFIG_AUTOSCRIPT || CFG_CMD_AUTOSCRIPT */
/**************************************************/
-#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
+#if defined(CONFIG_CMD_AUTOSCRIPT)
int
do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
@@ -170,7 +169,7 @@ do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return rcode;
}
-#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
+#if defined(CONFIG_CMD_AUTOSCRIPT)
U_BOOT_CMD(
autoscr, 2, 0, do_autoscript,
"autoscr - run script from memory\n",
@@ -179,4 +178,4 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_AUTOSCRIPT */
-#endif /* CONFIG_AUTOSCRIPT || CFG_CMD_AUTOSCRIPT */
+#endif /* CFG_CMD_AUTOSCRIPT */
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index b5ba2a03741..55cb1000442 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -30,7 +30,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if (CONFIG_COMMANDS & CFG_CMD_BDI) || defined(CONFIG_CMD_BDI)
+#if defined(CONFIG_CMD_BDI)
static void print_num(const char *, ulong);
#ifndef CONFIG_ARM /* PowerPC and other */
diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c
index 4c309f9a9b0..0bd622bfd5d 100644
--- a/common/cmd_bedbug.c
+++ b/common/cmd_bedbug.c
@@ -13,7 +13,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if (CONFIG_COMMANDS & CFG_CMD_BEDBUG) || defined(CONFIG_CMD_BEDBUG)
+#if defined(CONFIG_CMD_BEDBUG)
#ifndef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index d5c5bda01c7..241aa8357a3 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -31,7 +31,7 @@
#include <asm/byteorder.h>
#include <malloc.h>
-#if (CONFIG_COMMANDS & CFG_CMD_BMP) || defined(CONFIG_CMD_BMP)
+#if defined(CONFIG_CMD_BMP)
static int bmp_info (ulong addr);
static int bmp_display (ulong addr, int x, int y);
@@ -188,4 +188,4 @@ static int bmp_display(ulong addr, int x, int y)
#endif
}
-#endif /* (CONFIG_COMMANDS & CFG_CMD_BMP) || defined(CONFIG_CMD_BMP) */
+#endif /* defined(CONFIG_CMD_BMP) */
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 950e160d653..90de6b19a16 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -48,7 +48,7 @@ DECLARE_GLOBAL_DATA_PTR;
/*cmd_boot.c*/
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
#include <rtc.h>
#endif
@@ -89,11 +89,11 @@ int gunzip (void *, int, unsigned char *, unsigned long *);
static void *zalloc(void *, unsigned, unsigned);
static void zfree(void *, void *, unsigned);
-#if (CONFIG_COMMANDS & CFG_CMD_IMI) || defined(CONFIG_CMD_IMI)
+#if defined(CONFIG_CMD_IMI)
static int image_info (unsigned long addr);
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_IMLS) || defined(CONFIG_CMD_IMLS)
+#if defined(CONFIG_CMD_IMLS)
#include <flash.h>
extern flash_info_t flash_info[]; /* info for FLASH chips */
static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
@@ -133,7 +133,7 @@ static void fixup_silent_linux (void);
#endif
static boot_os_Fcn do_bootm_netbsd;
static boot_os_Fcn do_bootm_rtems;
-#if (CONFIG_COMMANDS & CFG_CMD_ELF) || defined(CONFIG_CMD_ELF)
+#if defined(CONFIG_CMD_ELF)
static boot_os_Fcn do_bootm_vxworks;
static boot_os_Fcn do_bootm_qnxelf;
int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] );
@@ -440,7 +440,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
addr, len_ptr, verify);
break;
-#if (CONFIG_COMMANDS & CFG_CMD_ELF) || defined(CONFIG_CMD_ELF)
+#if defined(CONFIG_CMD_ELF)
case IH_OS_VXWORKS:
do_bootm_vxworks (cmdtp, flag, argc, argv,
addr, len_ptr, verify);
@@ -1219,7 +1219,7 @@ do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_BOOTD) || defined(CONFIG_CMD_BOOTD)
+#if defined(CONFIG_CMD_BOOTD)
int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
int rcode = 0;
@@ -1247,7 +1247,7 @@ U_BOOT_CMD(
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_IMI) || defined(CONFIG_CMD_IMI)
+#if defined(CONFIG_CMD_IMI)
int do_iminfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
int arg;
@@ -1317,7 +1317,7 @@ U_BOOT_CMD(
#endif /* CFG_CMD_IMI */
-#if (CONFIG_COMMANDS & CFG_CMD_IMLS) || defined(CONFIG_CMD_IMLS)
+#if defined(CONFIG_CMD_IMLS)
/*-----------------------------------------------------------------------
* List all images found in flash.
*/
@@ -1378,13 +1378,13 @@ U_BOOT_CMD(
void
print_image_hdr (image_header_t *hdr)
{
-#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
time_t timestamp = (time_t)ntohl(hdr->ih_time);
struct rtc_time tm;
#endif
printf (" Image Name: %.*s\n", IH_NMLEN, hdr->ih_name);
-#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
to_tm (timestamp, &tm);
printf (" Created: %4d-%02d-%02d %2d:%02d:%02d UTC\n",
tm.tm_year, tm.tm_mon, tm.tm_mday,
@@ -1588,7 +1588,7 @@ do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
(*entry_point ) ( gd->bd );
}
-#if (CONFIG_COMMANDS & CFG_CMD_ELF) || defined(CONFIG_CMD_ELF)
+#if defined(CONFIG_CMD_ELF)
static void
do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
ulong addr, ulong *len_ptr, int verify)
diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 29ca6213f05..6890fafc306 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -27,7 +27,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_CACHE) || defined(CONFIG_CMD_CACHE)
+#if defined(CONFIG_CMD_CACHE)
static int on_off (const char *);
diff --git a/common/cmd_console.c b/common/cmd_console.c
index 70f8a20649e..530e3453c74 100644
--- a/common/cmd_console.c
+++ b/common/cmd_console.c
@@ -28,7 +28,7 @@
#include <command.h>
#include <devices.h>
-#if (CONFIG_COMMANDS & CFG_CMD_CONSOLE) || defined(CONFIG_CMD_CONSOLE)
+#if defined(CONFIG_CMD_CONSOLE)
extern void _do_coninfo (void);
int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[])
diff --git a/common/cmd_date.c b/common/cmd_date.c
index 7b7f547ddb3..93c2ca43dc5 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -31,7 +31,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
const char *weekdays[] = {
"Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur",
diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c
index 31c732e8daa..e79280c105a 100644
--- a/common/cmd_dcr.c
+++ b/common/cmd_dcr.c
@@ -29,7 +29,7 @@
#include <config.h>
#include <command.h>
-#if defined(CONFIG_4xx) && ((CONFIG_COMMANDS & CFG_CMD_SETGETDCR) || defined(CONFIG_CMD_SETGETDCR))
+#if defined(CONFIG_4xx) && defined(CONFIG_CMD_SETGETDCR)
unsigned long get_dcr (unsigned short);
unsigned long set_dcr (unsigned short, unsigned long);
diff --git a/common/cmd_diag.c b/common/cmd_diag.c
index 7293457c5d2..091e3c8a774 100644
--- a/common/cmd_diag.c
+++ b/common/cmd_diag.c
@@ -28,7 +28,7 @@
#include <command.h>
#include <post.h>
-#if ((CONFIG_COMMANDS & CFG_CMD_DIAG) || defined(CONFIG_CMD_DIAG)) && defined(CONFIG_POST)
+#if defined(CONFIG_CMD_DIAG) && defined(CONFIG_POST)
int do_diag (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
diff --git a/common/cmd_display.c b/common/cmd_display.c
index f2e7e880628..47ef35a1984 100644
--- a/common/cmd_display.c
+++ b/common/cmd_display.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_DISPLAY) || defined(CONFIG_CMD_DISPLAY)
+#if defined(CONFIG_CMD_DISPLAY)
#undef DEBUG_DISP
diff --git a/common/cmd_doc.c b/common/cmd_doc.c
index 4293aa18cf7..9af625ad205 100644
--- a/common/cmd_doc.c
+++ b/common/cmd_doc.c
@@ -19,7 +19,7 @@
# define SHOW_BOOT_PROGRESS(arg)
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_DOC) || defined(CONFIG_CMD_DOC)
+#if defined(CONFIG_CMD_DOC)
#include <linux/mtd/nftl.h>
#include <linux/mtd/doc2000.h>
@@ -1608,4 +1608,4 @@ void doc_probe(unsigned long physadr)
}
}
-#endif /* (CONFIG_COMMANDS & CFG_CMD_DOC) */
+#endif
diff --git a/common/cmd_dtt.c b/common/cmd_dtt.c
index b220ecb2fb6..8da95bf9d39 100644
--- a/common/cmd_dtt.c
+++ b/common/cmd_dtt.c
@@ -25,7 +25,7 @@
#include <config.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_DTT) || defined(CONFIG_CMD_DTT)
+#if defined(CONFIG_CMD_DTT)
#include <dtt.h>
#include <i2c.h>
@@ -61,4 +61,4 @@ U_BOOT_CMD(
" - Read temperature from digital thermometer and thermostat.\n"
);
-#endif /* CONFIG_COMMANDS & CFG_CMD_DTT */
+#endif
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index b4467e89cd6..d6fb9ab748c 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -42,7 +42,7 @@
#include <command.h>
#include <i2c.h>
-#if (CONFIG_COMMANDS & CFG_CMD_EEPROM) || defined(CFG_ENV_IS_IN_EEPROM) || defined(CONFIG_CMD_EEPROM)
+#if defined(CFG_ENV_IS_IN_EEPROM) || defined(CONFIG_CMD_EEPROM)
extern void eeprom_init (void);
extern int eeprom_read (unsigned dev_addr, unsigned offset,
@@ -62,7 +62,7 @@ extern int eeprom_write_enable (unsigned dev_addr, int state);
/* ------------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_EEPROM) || defined(CONFIG_CMD_EEPROM)
+#if defined(CONFIG_CMD_EEPROM)
int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
const char *const fmt =
@@ -121,7 +121,7 @@ int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
* 0x00000nxx for EEPROM address selectors and page number at n.
*/
-#if (CONFIG_COMMANDS & CFG_CMD_EEPROM) || defined(CFG_ENV_IS_IN_EEPROM) || defined(CONFIG_CMD_EEPROM)
+#if defined(CFG_ENV_IS_IN_EEPROM) || defined(CONFIG_CMD_EEPROM)
#ifndef CONFIG_SPI
#if !defined(CFG_I2C_EEPROM_ADDR_LEN) || CFG_I2C_EEPROM_ADDR_LEN < 1 || CFG_I2C_EEPROM_ADDR_LEN > 2
@@ -425,7 +425,7 @@ void eeprom_init (void)
#endif /* CFG_CMD_EEPROM */
/***************************************************/
-#if (CONFIG_COMMANDS & CFG_CMD_EEPROM) || defined(CONFIG_CMD_EEPROM)
+#if defined(CONFIG_CMD_EEPROM)
#ifdef CFG_I2C_MULTI_EEPROMS
U_BOOT_CMD(
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index cc8a8daa707..6d726193802 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -23,7 +23,7 @@
DECLARE_GLOBAL_DATA_PTR;
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_ELF) || defined(CONFIG_CMD_ELF)
+#if defined(CONFIG_CMD_ELF)
#ifndef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
@@ -101,7 +101,7 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
else
addr = simple_strtoul (argv[1], NULL, 16);
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
/* Check to see if we need to tftp the image ourselves before starting */
if ((argc == 2) && (strcmp (argv[1], "tftp") == 0)) {
diff --git a/common/cmd_ext2.c b/common/cmd_ext2.c
index d0999acd9e5..8bd2b476e54 100644
--- a/common/cmd_ext2.c
+++ b/common/cmd_ext2.c
@@ -35,14 +35,14 @@
#include <common.h>
#include <part.h>
-#if (CONFIG_COMMANDS & CFG_CMD_EXT2) || defined(CONFIG_CMD_EXT2)
+#if defined(CONFIG_CMD_EXT2)
#include <config.h>
#include <command.h>
#include <image.h>
#include <linux/ctype.h>
#include <asm/byteorder.h>
#include <ext2fs.h>
-#if (((CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB)) && defined(CONFIG_USB_STORAGE))
+#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
#include <usb.h>
#endif
@@ -260,4 +260,4 @@ U_BOOT_CMD(
" to address 'addr' from ext2 filesystem\n"
);
-#endif /* CONFIG_COMMANDS & CFG_CMD_EXT2 */
+#endif
diff --git a/common/cmd_fat.c b/common/cmd_fat.c
index f7e6c86dc2d..0f0ff4a369a 100644
--- a/common/cmd_fat.c
+++ b/common/cmd_fat.c
@@ -31,7 +31,7 @@
#include <ata.h>
#include <part.h>
-#if (CONFIG_COMMANDS & CFG_CMD_FAT) || defined(CONFIG_CMD_FAT)
+#if defined(CONFIG_CMD_FAT)
#undef DEBUG
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 3c2ba56bb3b..7349412c77a 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -47,12 +47,11 @@
#endif
-/*#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_CMD_DATE) */
+/*#if defined(CONFIG_CMD_DATE) */
/*#include <rtc.h> */
/*#endif */
-#if (CONFIG_COMMANDS & CFG_CMD_FDC) || defined(CONFIG_CMD_FDC) \
- || (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS)
+#if defined(CONFIG_CMD_FDC) || defined(CONFIG_CMD_FDOS)
typedef struct {
@@ -708,9 +707,9 @@ int fdc_setup(int drive, FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
return TRUE;
}
-#endif /* ((CONFIG_COMMANDS & CFG_CMD_FDC)||(CONFIG_COMMANDS & CFG_CMD_FDOS))*/
+#endif
-#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS)
+#if defined(CONFIG_CMD_FDOS)
/* Low level functions for the Floppy-DOS layer */
@@ -773,9 +772,9 @@ int fdc_fdos_read (void *buffer, int len)
return (fdc_read_data (buffer, len, pCMD, pFG));
}
-#endif /* (CONFIG_COMMANDS & CFG_CMD_FDOS) */
+#endif
-#if (CONFIG_COMMANDS & CFG_CMD_FDC) || defined(CONFIG_CMD_FDC)
+#if defined(CONFIG_CMD_FDC)
/****************************************************************************
* main routine do_fdcboot
*/
@@ -881,13 +880,13 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
-#endif /* CONFIG_COMMANDS & CFG_CMD_FDC */
+#endif
/***************************************************/
-#if (CONFIG_COMMANDS & CFG_CMD_FDC) || defined(CONFIG_CMD_FDC)
+#if defined(CONFIG_CMD_FDC)
U_BOOT_CMD(
fdcboot, 3, 1, do_fdcboot,
diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c
index 8208d7b82ff..f9da98ddcc7 100644
--- a/common/cmd_fdos.c
+++ b/common/cmd_fdos.c
@@ -31,7 +31,7 @@
#include <command.h>
#include <fdc.h>
-#if (CONFIG_COMMANDS & CFG_CMD_FDOS) || defined(CONFIG_CMD_FDOS)
+#if defined(CONFIG_CMD_FDOS)
/*-----------------------------------------------------------------------------
* do_fdosboot --
@@ -154,4 +154,4 @@ U_BOOT_CMD(
"[directory]\n"
);
-#endif /* CONFIG_COMMANDS & CFG_CMD_FDOS */
+#endif
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index 4744e977674..e191f9ce407 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -31,9 +31,9 @@
#include <dataflash.h>
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH)
+#if defined(CONFIG_CMD_FLASH)
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_CMDLINE)
+#if (defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
#include <jffs2/jffs2.h>
/* parition handling routines */
@@ -311,7 +311,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
flash_info_t *info;
ulong bank, addr_first, addr_last;
int n, sect_first, sect_last;
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
struct mtd_device *dev;
struct part_info *part;
u8 dev_type, dev_num, pnum;
@@ -343,7 +343,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return rcode;
}
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
/* erase <part-id> - erase partition */
if ((argc == 2) && (id_parse(argv[1], NULL, &dev_type, &dev_num) == 0)) {
mtdparts_init();
@@ -447,7 +447,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
flash_info_t *info;
ulong bank, addr_first, addr_last;
int i, p, n, sect_first, sect_last;
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
struct mtd_device *dev;
struct part_info *part;
u8 dev_type, dev_num, pnum;
@@ -539,7 +539,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return rcode;
}
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
/* protect on/off <part-id> */
if ((argc == 3) && (id_parse(argv[2], NULL, &dev_type, &dev_num) == 0)) {
mtdparts_init();
@@ -672,7 +672,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
/**************************************************/
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
# define TMP_ERASE "erase <part-id>\n - erase partition\n"
# define TMP_PROT_ON "protect on <part-id>\n - protect partition\n"
# define TMP_PROT_OFF "protect off <part-id>\n - make partition writable\n"
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index e32b29a0112..3fc4fca9ae2 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -27,7 +27,7 @@
*/
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
#include <net.h>
#endif
#include <fpga.h>
@@ -43,7 +43,7 @@
#define PRINTF(fmt,args...)
#endif
-#if defined (CONFIG_FPGA) && ((CONFIG_COMMANDS & CFG_CMD_FPGA ) || defined(CONFIG_CMD_FPGA))
+#if defined (CONFIG_FPGA) && defined(CONFIG_CMD_FPGA)
/* Local functions */
static void fpga_usage (cmd_tbl_t * cmdtp);
@@ -321,4 +321,4 @@ U_BOOT_CMD (fpga, 6, 1, do_fpga,
"\tloadb\tLoad device from bitstream buffer (Xilinx devices only)\n"
"\tloadmk\tLoad device generated with mkimage\n"
"\tdump\tLoad device to memory buffer\n");
-#endif /* CONFIG_FPGA && CONFIG_COMMANDS & CFG_CMD_FPGA */
+#endif