aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2007-07-08 18:02:23 -0500
committerJon Loeliger <jdl@freescale.com>2007-07-08 18:02:23 -0500
commitc76fe47425afc7d5d670ff0539823c85d65d9c42 (patch)
treec4076ca879e90b98101d8c8ac8df240057bfb331
parentbaa26db4113679b80970ff447d91cc10217742a6 (diff)
downloadu-boot-c76fe47425afc7d5d670ff0539823c85d65d9c42.zip
u-boot-c76fe47425afc7d5d670ff0539823c85d65d9c42.tar.gz
u-boot-c76fe47425afc7d5d670ff0539823c85d65d9c42.tar.bz2
common/cmd_[i-n]*: Remove obsolete references to CONFIG_COMMANDS.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
-rw-r--r--common/cmd_i2c.c10
-rw-r--r--common/cmd_ide.c4
-rw-r--r--common/cmd_immap.c2
-rw-r--r--common/cmd_itest.c4
-rw-r--r--common/cmd_jffs2.c14
-rw-r--r--common/cmd_load.c20
-rw-r--r--common/cmd_mem.c15
-rw-r--r--common/cmd_mfsl.c2
-rw-r--r--common/cmd_mii.c2
-rw-r--r--common/cmd_misc.c6
-rw-r--r--common/cmd_mmc.c2
-rw-r--r--common/cmd_nand.c23
-rw-r--r--common/cmd_net.c16
-rw-r--r--common/cmd_nvedit.c18
14 files changed, 60 insertions, 78 deletions
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index b9d9d33..6aeeb84 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -86,7 +86,7 @@
#include <i2c.h>
#include <asm/byteorder.h>
-#if (CONFIG_COMMANDS & CFG_CMD_I2C) || defined(CONFIG_CMD_I2C)
+#if defined(CONFIG_CMD_I2C)
/* Display values from last command.
@@ -657,7 +657,7 @@ int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* The SDRAM command is separately configured because many
* (most?) embedded boards don't use SDRAM DIMMs.
*/
-#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || defined(CONFIG_CMD_SDRAM)
+#if defined(CONFIG_CMD_SDRAM)
/*
* Syntax:
@@ -938,7 +938,7 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
return do_i2c_probe(cmdtp, flag, --argc, ++argv);
if (!strncmp(argv[1], "lo", 2))
return do_i2c_loop(cmdtp, flag, --argc, ++argv);
-#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || defined(CONFIG_CMD_SDRAM)
+#if defined(CONFIG_CMD_SDRAM)
if (!strncmp(argv[1], "sd", 2))
return do_sdram(cmdtp, flag, --argc, ++argv);
#endif /* CFG_CMD_SDRAM */
@@ -965,7 +965,7 @@ U_BOOT_CMD(
"i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
"i2c probe - show devices on the I2C bus\n"
"i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n"
-#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || defined(CONFIG_CMD_SDRAM)
+#if defined(CONFIG_CMD_SDRAM)
"i2c sdram chip - print SDRAM configuration information\n"
#endif /* CFG_CMD_SDRAM */
);
@@ -1016,7 +1016,7 @@ U_BOOT_CMD(
" - loop, reading a set of addresses\n"
);
-#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || defined(CONFIG_CMD_SDRAM)
+#if defined(CONFIG_CMD_SDRAM)
U_BOOT_CMD(
isdram, 2, 1, do_sdram,
"isdram - print SDRAM configuration information\n",
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 461a4bc..d74f2da 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -78,7 +78,7 @@ DECLARE_GLOBAL_DATA_PTR;
# define SYNC /* nothing */
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE)
+#if defined(CONFIG_CMD_IDE)
#ifdef CONFIG_IDE_8xx_DIRECT
/* Timings for IDE Interface
@@ -2080,4 +2080,4 @@ U_BOOT_CMD(
"loadAddr dev:part\n"
);
-#endif /* CONFIG_COMMANDS & CFG_CMD_IDE */
+#endif
diff --git a/common/cmd_immap.c b/common/cmd_immap.c
index 477c742..e211b16 100644
--- a/common/cmd_immap.c
+++ b/common/cmd_immap.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <command.h>
-#if ((CONFIG_COMMANDS & CFG_CMD_IMMAP) || defined(CONFIG_CMD_IMMAP)) && \
+#if defined(CONFIG_CMD_IMMAP) && \
(defined(CONFIG_8xx) || defined(CONFIG_8260))
#if defined(CONFIG_8xx)
diff --git a/common/cmd_itest.c b/common/cmd_itest.c
index 24129aa..8e20517 100644
--- a/common/cmd_itest.c
+++ b/common/cmd_itest.c
@@ -32,7 +32,7 @@
#include <config.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_ITEST) || defined(CONFIG_CMD_ITEST)
+#if defined(CONFIG_CMD_ITEST)
#define EQ 0
#define NE 1
@@ -197,4 +197,4 @@ U_BOOT_CMD(
"itest\t- return true/false on integer compare\n",
"[.b, .w, .l, .s] [*]value1 <op> [*]value2\n"
);
-#endif /* CONFIG_COMMANDS & CFG_CMD_ITEST */
+#endif
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index 8a882ab..777607a 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -94,18 +94,18 @@
#include <linux/list.h>
#include <linux/ctype.h>
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)
+#if defined(CONFIG_CMD_JFFS2)
#include <cramfs/cramfs_fs.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
#ifdef CFG_NAND_LEGACY
#include <linux/mtd/nand_legacy.h>
#else /* !CFG_NAND_LEGACY */
#include <linux/mtd/nand.h>
#include <nand.h>
#endif /* !CFG_NAND_LEGACY */
-#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
+#endif
/* enable/disable debugging messages */
#define DEBUG_JFFS
#undef DEBUG_JFFS
@@ -321,7 +321,7 @@ static void current_save(void)
*/
static int part_validate_nor(struct mtdids *id, struct part_info *part)
{
-#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH)
+#if defined(CONFIG_CMD_FLASH)
/* info for FLASH chips */
extern flash_info_t flash_info[];
flash_info_t *flash;
@@ -370,7 +370,7 @@ static int part_validate_nor(struct mtdids *id, struct part_info *part)
*/
static int part_validate_nand(struct mtdids *id, struct part_info *part)
{
-#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND))
+#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
/* info for NAND chips */
nand_info_t *nand;
@@ -719,7 +719,7 @@ static int part_parse(const char *const partdef, const char **ret, struct part_i
static int device_validate(u8 type, u8 num, u32 *size)
{
if (type == MTD_DEV_TYPE_NOR) {
-#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || defined(CONFIG_CMD_FLASH)
+#if defined(CONFIG_CMD_FLASH)
if (num < CFG_MAX_FLASH_BANKS) {
extern flash_info_t flash_info[];
*size = flash_info[num].size;
@@ -733,7 +733,7 @@ static int device_validate(u8 type, u8 num, u32 *size)
printf("support for FLASH devices not present\n");
#endif
} else if (type == MTD_DEV_TYPE_NAND) {
-#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND))
+#if defined(CONFIG_JFFS2_NAND) && defined(CONFIG_CMD_NAND)
if (num < CFG_MAX_NAND_DEVICE) {
#ifndef CFG_NAND_LEGACY
*size = nand_info[num].size;
diff --git a/common/cmd_load.c b/common/cmd_load.c
index 0456f75..d3d2681 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -33,14 +33,14 @@
DECLARE_GLOBAL_DATA_PTR;
-#if (CONFIG_COMMANDS & CFG_CMD_LOADB) || defined(CONFIG_CMD_LOADB)
+#if defined(CONFIG_CMD_LOADB)
static ulong load_serial_ymodem (ulong offset);
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_LOADS) || defined(CONFIG_CMD_LOADS)
+#if defined(CONFIG_CMD_LOADS)
static ulong load_serial (ulong offset);
static int read_record (char *buf, ulong len);
-# if (CONFIG_COMMANDS & CFG_CMD_SAVES) || defined(CONFIG_CMD_SAVES)
+# if defined(CONFIG_CMD_SAVES)
static int save_serial (ulong offset, ulong size);
static int write_record (char *buf);
# endif /* CFG_CMD_SAVES */
@@ -50,7 +50,7 @@ static int do_echo = 1;
/* -------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADS) || defined(CONFIG_CMD_LOADS)
+#if defined(CONFIG_CMD_LOADS)
int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
ulong offset = 0;
@@ -253,7 +253,7 @@ read_record (char *buf, ulong len)
return (p - buf);
}
-#if (CONFIG_COMMANDS & CFG_CMD_SAVES) || defined(CONFIG_CMD_SAVES)
+#if defined(CONFIG_CMD_SAVES)
int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
@@ -404,7 +404,7 @@ write_record (char *buf)
#endif /* CFG_CMD_LOADS */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADB) || defined(CONFIG_CMD_LOADB)
+#if defined(CONFIG_CMD_LOADB)
/*
* loadb command (load binary) included
*/
@@ -1042,7 +1042,7 @@ static ulong load_serial_ymodem (ulong offset)
/* -------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADS) || defined(CONFIG_CMD_LOADS)
+#if defined(CONFIG_CMD_LOADS)
#ifdef CFG_LOADS_BAUD_CHANGE
U_BOOT_CMD(
@@ -1067,7 +1067,7 @@ U_BOOT_CMD(
*/
-#if (CONFIG_COMMANDS & CFG_CMD_SAVES) || defined(CONFIG_CMD_SAVES)
+#if defined(CONFIG_CMD_SAVES)
#ifdef CFG_LOADS_BAUD_CHANGE
U_BOOT_CMD(
saves, 4, 0, do_save_serial,
@@ -1088,7 +1088,7 @@ U_BOOT_CMD(
#endif /* CFG_CMD_LOADS */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADB) || defined(CONFIG_CMD_LOADB)
+#if defined(CONFIG_CMD_LOADB)
U_BOOT_CMD(
loadb, 3, 0, do_load_serial_bin,
"loadb - load binary file over serial line (kermit mode)\n",
@@ -1109,7 +1109,7 @@ U_BOOT_CMD(
/* -------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_HWFLOW) || defined(CONFIG_CMD_HWFLOW)
+#if defined(CONFIG_CMD_HWFLOW)
int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
extern int hwflow_onoff(int);
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index b547974..001dfa2 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -29,19 +29,14 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_CMD_MMC)
+#if defined(CONFIG_CMD_MMC)
#include <mmc.h>
#endif
#ifdef CONFIG_HAS_DATAFLASH
#include <dataflash.h>
#endif
-#if (CONFIG_COMMANDS & (CFG_CMD_MEMORY | \
- CFG_CMD_I2C | \
- CFG_CMD_ITEST | \
- CFG_CMD_PCI | \
- CMD_CMD_PORTIO ) ) \
- || defined(CONFIG_CMD_MEMORY) \
+#if defined(CONFIG_CMD_MEMORY) \
|| defined(CONFIG_CMD_I2C) \
|| defined(CONFIG_CMD_ITEST) \
|| defined(CONFIG_CMD_PCI) \
@@ -70,7 +65,7 @@ int cmd_get_data_size(char* arg, int default_size)
}
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_MEMORY) || defined(CONFIG_CMD_MEMORY)
+#if defined(CONFIG_CMD_MEMORY)
#ifdef CMD_MEM_DEBUG
#define PRINTF(fmt,args...) printf (fmt ,##args)
@@ -409,7 +404,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_CMD_MMC)
+#if defined(CONFIG_CMD_MMC)
if (mmc2info(dest)) {
int rc;
@@ -1155,7 +1150,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif /* CONFIG_CRC32_VERIFY */
/**************************************************/
-#if (CONFIG_COMMANDS & CFG_CMD_MEMORY) || defined(CONFIG_CMD_MEMORY)
+#if defined(CONFIG_CMD_MEMORY)
U_BOOT_CMD(
md, 3, 1, do_mem_md,
"md - memory display\n",
diff --git a/common/cmd_mfsl.c b/common/cmd_mfsl.c
index 5dcfc94..b143dc2 100644
--- a/common/cmd_mfsl.c
+++ b/common/cmd_mfsl.c
@@ -30,7 +30,7 @@
#include <config.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_MFSL) || defined(CONFIG_CMD_MFSL)
+#if defined(CONFIG_CMD_MFSL)
#include <asm/asm.h>
int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index bfeef79..120b8e8 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII)
+#if defined(CONFIG_CMD_MII)
#include <miiphy.h>
#ifdef CONFIG_TERSE_MII
diff --git a/common/cmd_misc.c b/common/cmd_misc.c
index c554013..4d5a2ff 100644
--- a/common/cmd_misc.c
+++ b/common/cmd_misc.c
@@ -27,7 +27,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_MISC) || defined(CONFIG_CMD_MISC)
+#if defined(CONFIG_CMD_MISC)
int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
@@ -52,7 +52,7 @@ int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
/* Implemented in $(CPU)/interrupts.c */
-#if (CONFIG_COMMANDS & CFG_CMD_IRQ) || defined(CONFIG_CMD_IRQ)
+#if defined(CONFIG_CMD_IRQ)
int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
U_BOOT_CMD(
@@ -60,7 +60,7 @@ U_BOOT_CMD(
"irqinfo - print information about IRQs\n",
NULL
);
-#endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */
+#endif
U_BOOT_CMD(
sleep , 2, 1, do_sleep,
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 7abaa98..c772e9b 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_CMD_MMC)
+#if defined(CONFIG_CMD_MMC)
#include <mmc.h>
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 63a68eb..d584445 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -19,7 +19,7 @@
*/
#include <common.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
#include <command.h>
#include <watchdog.h>
@@ -36,8 +36,7 @@
#include <jffs2/jffs2.h>
#include <nand.h>
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
- && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
/* parition handling routines */
int mtdparts_init(void);
@@ -105,8 +104,7 @@ static int
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
{
int idx = nand_curr_device;
-#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 pnum;
@@ -154,8 +152,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
*size = nand->size - *off;
}
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
- && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
out:
#endif
printf("device %d ", idx);
@@ -537,8 +534,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
char *boot_device = NULL;
int idx;
ulong addr, offset = 0;
-#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 pnum;
@@ -582,8 +578,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
offset = simple_strtoul(argv[3], NULL, 16);
break;
default:
-#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
- && defined(CONFIG_JFFS2_CMDLINE)
+#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
usage:
#endif
printf("Usage:\n%s\n", cmdtp->usage);
@@ -612,7 +607,7 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
"nboot - boot from NAND device\n",
"[partition] | [[[loadAddr] dev] offset]\n");
-#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
+#endif
#else /* CFG_NAND_LEGACY */
/*
@@ -632,7 +627,7 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
# define SHOW_BOOT_PROGRESS(arg)
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)
#include <linux/mtd/nand_legacy.h>
#if 0
#include <linux/mtd/nand_ids.h>
@@ -990,6 +985,6 @@ U_BOOT_CMD(
"loadAddr dev\n"
);
-#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
+#endif
#endif /* CFG_NAND_LEGACY */
diff --git a/common/cmd_net.c b/common/cmd_net.c
index ad9a7dc..da55f14 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -28,7 +28,7 @@
#include <command.h>
#include <net.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
@@ -68,7 +68,7 @@ U_BOOT_CMD(
"[loadAddress] [bootfilename]\n"
);
-#if (CONFIG_COMMANDS & CFG_CMD_DHCP) || defined(CONFIG_CMD_DHCP)
+#if defined(CONFIG_CMD_DHCP)
int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
return netboot_common(DHCP, cmdtp, argc, argv);
@@ -81,7 +81,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_DHCP */
-#if (CONFIG_COMMANDS & CFG_CMD_NFS) || defined(CONFIG_CMD_NFS)
+#if defined(CONFIG_CMD_NFS)
int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
return netboot_common(NFS, cmdtp, argc, argv);
@@ -137,14 +137,14 @@ static void netboot_update_env (void)
if (NetOurNISDomain[0])
setenv ("domain", NetOurNISDomain);
-#if ((CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)) \
+#if defined(CONFIG_CMD_SNTP) \
&& (CONFIG_BOOTP_MASK & CONFIG_BOOTP_TIMEOFFSET)
if (NetTimeOffset) {
sprintf (tmp, "%d", NetTimeOffset);
setenv ("timeoffset", tmp);
}
#endif
-#if ((CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)) \
+#if defined(CONFIG_CMD_SNTP) \
&& (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER)
if (NetNtpServerIP) {
ip_to_string (NetNtpServerIP, tmp);
@@ -222,7 +222,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
return rcode;
}
-#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING)
+#if defined(CONFIG_CMD_PING)
int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
if (argc < 2)
@@ -251,7 +251,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_PING */
-#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP)
+#if defined(CONFIG_CMD_CDP)
static void cdp_update_env(void)
{
@@ -294,7 +294,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_CDP */
-#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)
+#if defined(CONFIG_CMD_SNTP)
int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
char *toff;
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 27e46db..68a2dc8 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -46,7 +46,7 @@
#include <serial.h>
#include <linux/stddef.h>
#include <asm/byteorder.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
#include <net.h>
#endif
@@ -367,7 +367,7 @@ int _do_setenv (int flag, int argc, char *argv[])
load_addr = simple_strtoul(argv[2], NULL, 16);
return 0;
}
-#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)
+#if defined(CONFIG_CMD_NET)
if (strcmp(argv[1],"bootfile") == 0) {
copy_filename (BootFile, argv[2], sizeof(BootFile));
return 0;
@@ -411,7 +411,7 @@ int do_setenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* Prompt for environment variable
*/
-#if (CONFIG_COMMANDS & CFG_CMD_ASKENV) || defined(CONFIG_CMD_ASKENV)
+#if defined(CONFIG_CMD_ASKENV)
int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
extern char console_buffer[CFG_CBSIZE];
@@ -539,10 +539,6 @@ int getenv_r (char *name, char *buf, unsigned len)
}
#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \
- ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == \
- (CFG_CMD_ENV|CFG_CMD_FLASH)) || \
- ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_NAND)) == \
- (CFG_CMD_ENV|CFG_CMD_NAND)) \
|| (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_FLASH)) \
|| (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_NAND))
int do_saveenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -599,10 +595,6 @@ U_BOOT_CMD(
);
#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \
- ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == \
- (CFG_CMD_ENV|CFG_CMD_FLASH)) || \
- ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_NAND)) == \
- (CFG_CMD_ENV|CFG_CMD_NAND)) \
|| (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_FLASH)) \
|| (defined(CONFIG_CMD_ENV) && defined(CONFIG_CMD_NAND))
U_BOOT_CMD(
@@ -613,7 +605,7 @@ U_BOOT_CMD(
#endif /* CFG_CMD_ENV */
-#if (CONFIG_COMMANDS & CFG_CMD_ASKENV) || defined(CONFIG_CMD_ASKENV)
+#if defined(CONFIG_CMD_ASKENV)
U_BOOT_CMD(
askenv, CFG_MAXARGS, 1, do_askenv,
@@ -630,7 +622,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_ASKENV */
-#if (CONFIG_COMMANDS & CFG_CMD_RUN) || defined(CONFIG_CMD_RUN)
+#if defined(CONFIG_CMD_RUN)
int do_run (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
U_BOOT_CMD(
run, CFG_MAXARGS, 1, do_run,