[U-Boot-Users] [PATCH: cmdcfg: 03/19] common/cmd_[i-z]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
Jon Loeliger
jdl at jdl.com
Tue Jun 12 02:01:54 CEST 2007
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.
All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
Signed-off-by: Jon Loeliger <jdl at freescale.com>
---
common/cmd_i2c.c | 10 +++++-----
common/cmd_ide.c | 2 +-
common/cmd_immap.c | 2 +-
common/cmd_itest.c | 2 +-
common/cmd_jffs2.c | 12 ++++++------
common/cmd_load.c | 24 +++++++++++++-----------
common/cmd_mem.c | 16 +++++++++++-----
common/cmd_mfsl.c | 2 +-
common/cmd_mii.c | 2 +-
common/cmd_misc.c | 4 ++--
common/cmd_mmc.c | 2 +-
common/cmd_nand.c | 19 ++++++++++++-------
common/cmd_net.c | 18 ++++++++++--------
common/cmd_nvedit.c | 18 +++++++++++-------
common/cmd_pci.c | 2 +-
common/cmd_pcmcia.c | 5 +++--
common/cmd_portio.c | 2 +-
common/cmd_reginfo.c | 5 +++--
common/cmd_reiser.c | 2 +-
common/cmd_scsi.c | 2 +-
common/cmd_spi.c | 2 +-
common/cmd_universe.c | 2 +-
common/cmd_usb.c | 4 ++--
common/cmd_vfd.c | 2 +-
common/cmd_ximg.c | 2 +-
25 files changed, 92 insertions(+), 71 deletions(-)
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 755810d..b9d9d33 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)
+#if (CONFIG_COMMANDS & CFG_CMD_I2C) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_SDRAM) || 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 e308474..461a4bc 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)
+#if (CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE)
#ifdef CONFIG_IDE_8xx_DIRECT
/* Timings for IDE Interface
diff --git a/common/cmd_immap.c b/common/cmd_immap.c
index fa79b45..477c742 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) && \
+#if ((CONFIG_COMMANDS & CFG_CMD_IMMAP) || 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 8ad134f..24129aa 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)
+#if (CONFIG_COMMANDS & CFG_CMD_ITEST) || defined(CONFIG_CMD_ITEST)
#define EQ 0
#define NE 1
diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index 7fd1fa3..8a882ab 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -94,11 +94,11 @@
#include <linux/list.h>
#include <linux/ctype.h>
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)
#include <cramfs/cramfs_fs.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
#ifdef CFG_NAND_LEGACY
#include <linux/mtd/nand_legacy.h>
#else /* !CFG_NAND_LEGACY */
@@ -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)
+#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || 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)
+#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_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)
+#if (CONFIG_COMMANDS & CFG_CMD_FLASH) || 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)
+#if defined(CONFIG_JFFS2_NAND) && ((CONFIG_COMMANDS & CFG_CMD_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 f63b8e8..0456f75 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)
+#if (CONFIG_COMMANDS & CFG_CMD_LOADB) || defined(CONFIG_CMD_LOADB)
static ulong load_serial_ymodem (ulong offset);
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_LOADS)
+#if (CONFIG_COMMANDS & CFG_CMD_LOADS) || defined(CONFIG_CMD_LOADS)
static ulong load_serial (ulong offset);
static int read_record (char *buf, ulong len);
-# if (CONFIG_COMMANDS & CFG_CMD_SAVES)
+# if (CONFIG_COMMANDS & CFG_CMD_SAVES) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_LOADS) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_SAVES) || defined(CONFIG_CMD_SAVES)
int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
@@ -404,8 +404,10 @@ write_record (char *buf)
#endif /* CFG_CMD_LOADS */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADB) /* loadb command (load binary) included */
-
+#if (CONFIG_COMMANDS & CFG_CMD_LOADB) || defined(CONFIG_CMD_LOADB)
+/*
+ * loadb command (load binary) included
+ */
#define XON_CHAR 17
#define XOFF_CHAR 19
#define START_CHAR 0x01
@@ -1040,7 +1042,7 @@ static ulong load_serial_ymodem (ulong offset)
/* -------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADS)
+#if (CONFIG_COMMANDS & CFG_CMD_LOADS) || defined(CONFIG_CMD_LOADS)
#ifdef CFG_LOADS_BAUD_CHANGE
U_BOOT_CMD(
@@ -1065,7 +1067,7 @@ U_BOOT_CMD(
*/
-#if (CONFIG_COMMANDS & CFG_CMD_SAVES)
+#if (CONFIG_COMMANDS & CFG_CMD_SAVES) || defined(CONFIG_CMD_SAVES)
#ifdef CFG_LOADS_BAUD_CHANGE
U_BOOT_CMD(
saves, 4, 0, do_save_serial,
@@ -1086,7 +1088,7 @@ U_BOOT_CMD(
#endif /* CFG_CMD_LOADS */
-#if (CONFIG_COMMANDS & CFG_CMD_LOADB)
+#if (CONFIG_COMMANDS & CFG_CMD_LOADB) || defined(CONFIG_CMD_LOADB)
U_BOOT_CMD(
loadb, 3, 0, do_load_serial_bin,
"loadb - load binary file over serial line (kermit mode)\n",
@@ -1107,7 +1109,7 @@ U_BOOT_CMD(
/* -------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_HWFLOW)
+#if (CONFIG_COMMANDS & CFG_CMD_HWFLOW) || 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 fcbb023..b547974 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -29,7 +29,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_MMC)
+#if (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_CMD_MMC)
#include <mmc.h>
#endif
#ifdef CONFIG_HAS_DATAFLASH
@@ -40,7 +40,13 @@
CFG_CMD_I2C | \
CFG_CMD_ITEST | \
CFG_CMD_PCI | \
- CMD_CMD_PORTIO ) )
+ CMD_CMD_PORTIO ) ) \
+ || defined(CONFIG_CMD_MEMORY) \
+ || defined(CONFIG_CMD_I2C) \
+ || defined(CONFIG_CMD_ITEST) \
+ || defined(CONFIG_CMD_PCI) \
+ || defined(CONFIG_CMD_PORTIO)
+
int cmd_get_data_size(char* arg, int default_size)
{
/* Check for a size specification .b, .w or .l.
@@ -64,7 +70,7 @@ int cmd_get_data_size(char* arg, int default_size)
}
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_MEMORY)
+#if (CONFIG_COMMANDS & CFG_CMD_MEMORY) || defined(CONFIG_CMD_MEMORY)
#ifdef CMD_MEM_DEBUG
#define PRINTF(fmt,args...) printf (fmt ,##args)
@@ -403,7 +409,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_MMC)
+#if (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_CMD_MMC)
if (mmc2info(dest)) {
int rc;
@@ -1149,7 +1155,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)
+#if (CONFIG_COMMANDS & CFG_CMD_MEMORY) || 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 ffa2666..5dcfc94 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)
+#if (CONFIG_COMMANDS & CFG_CMD_MFSL) || 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 e659536..bfeef79 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)
+#if (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII)
#include <miiphy.h>
#ifdef CONFIG_TERSE_MII
diff --git a/common/cmd_misc.c b/common/cmd_misc.c
index 67ee9e8..dda009d 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)
+#if (CONFIG_COMMANDS & CFG_CMD_MISC) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_IRQ) || defined(CONFIG_CMD_IRQ)
int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
U_BOOT_CMD(
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 573eb97..7abaa98 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)
+#if (CONFIG_COMMANDS & CFG_CMD_MMC) || defined(CONFIG_CMD_MMC)
#include <mmc.h>
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index b011b5e..63a68eb 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -19,7 +19,7 @@
*/
#include <common.h>
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
#include <command.h>
#include <watchdog.h>
@@ -36,7 +36,8 @@
#include <jffs2/jffs2.h>
#include <nand.h>
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
+ && defined(CONFIG_JFFS2_CMDLINE)
/* parition handling routines */
int mtdparts_init(void);
@@ -104,7 +105,8 @@ 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_JFFS2_CMDLINE)
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
+ && defined(CONFIG_JFFS2_CMDLINE)
struct mtd_device *dev;
struct part_info *part;
u8 pnum;
@@ -152,7 +154,8 @@ 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_JFFS2_CMDLINE)
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
+ && defined(CONFIG_JFFS2_CMDLINE)
out:
#endif
printf("device %d ", idx);
@@ -534,7 +537,8 @@ 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_JFFS2_CMDLINE)
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
+ && defined(CONFIG_JFFS2_CMDLINE)
struct mtd_device *dev;
struct part_info *part;
u8 pnum;
@@ -578,7 +582,8 @@ 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_JFFS2_CMDLINE)
+#if ((CONFIG_COMMANDS & CFG_CMD_JFFS2) || defined(CONFIG_CMD_JFFS2)) \
+ && defined(CONFIG_JFFS2_CMDLINE)
usage:
#endif
printf("Usage:\n%s\n", cmdtp->usage);
@@ -627,7 +632,7 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
# define SHOW_BOOT_PROGRESS(arg)
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if (CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)
#include <linux/mtd/nand_legacy.h>
#if 0
#include <linux/mtd/nand_ids.h>
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 2cb2c5d..ad9a7dc 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)
+#if (CONFIG_COMMANDS & CFG_CMD_NET) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_DHCP) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_NFS) || 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,13 +137,15 @@ static void netboot_update_env (void)
if (NetOurNISDomain[0])
setenv ("domain", NetOurNISDomain);
-#if (CONFIG_COMMANDS & CFG_CMD_SNTP) && (CONFIG_BOOTP_MASK & CONFIG_BOOTP_TIMEOFFSET)
+#if ((CONFIG_COMMANDS & CFG_CMD_SNTP) || 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) && (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER)
+#if ((CONFIG_COMMANDS & CFG_CMD_SNTP) || defined(CONFIG_CMD_SNTP)) \
+ && (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER)
if (NetNtpServerIP) {
ip_to_string (NetNtpServerIP, tmp);
setenv ("ntpserverip", tmp);
@@ -220,7 +222,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
return rcode;
}
-#if (CONFIG_COMMANDS & CFG_CMD_PING)
+#if (CONFIG_COMMANDS & CFG_CMD_PING) || defined(CONFIG_CMD_PING)
int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
if (argc < 2)
@@ -249,7 +251,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_PING */
-#if (CONFIG_COMMANDS & CFG_CMD_CDP)
+#if (CONFIG_COMMANDS & CFG_CMD_CDP) || defined(CONFIG_CMD_CDP)
static void cdp_update_env(void)
{
@@ -292,7 +294,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_CDP */
-#if (CONFIG_COMMANDS & CFG_CMD_SNTP)
+#if (CONFIG_COMMANDS & CFG_CMD_SNTP) || 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 977ec5b..27e46db 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)
+#if (CONFIG_COMMANDS & CFG_CMD_NET) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_NET) || 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)
+#if (CONFIG_COMMANDS & CFG_CMD_ASKENV) || defined(CONFIG_CMD_ASKENV)
int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
extern char console_buffer[CFG_CBSIZE];
@@ -542,7 +542,9 @@ int getenv_r (char *name, char *buf, unsigned len)
((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))
+ (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[])
{
extern char * env_name_spec;
@@ -600,7 +602,9 @@ U_BOOT_CMD(
((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))
+ (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(
saveenv, 1, 0, do_saveenv,
"saveenv - save environment variables to persistent storage\n",
@@ -609,7 +613,7 @@ U_BOOT_CMD(
#endif /* CFG_CMD_ENV */
-#if (CONFIG_COMMANDS & CFG_CMD_ASKENV)
+#if (CONFIG_COMMANDS & CFG_CMD_ASKENV) || defined(CONFIG_CMD_ASKENV)
U_BOOT_CMD(
askenv, CFG_MAXARGS, 1, do_askenv,
@@ -626,7 +630,7 @@ U_BOOT_CMD(
);
#endif /* CFG_CMD_ASKENV */
-#if (CONFIG_COMMANDS & CFG_CMD_RUN)
+#if (CONFIG_COMMANDS & CFG_CMD_RUN) || 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,
diff --git a/common/cmd_pci.c b/common/cmd_pci.c
index 4508546..10e0691 100644
--- a/common/cmd_pci.c
+++ b/common/cmd_pci.c
@@ -38,7 +38,7 @@
#include <asm/io.h>
#include <pci.h>
-#if (CONFIG_COMMANDS & CFG_CMD_PCI)
+#if (CONFIG_COMMANDS & CFG_CMD_PCI) || defined(CONFIG_CMD_PCI)
extern int cmd_get_data_size(char* arg, int default_size);
diff --git a/common/cmd_pcmcia.c b/common/cmd_pcmcia.c
index 2eb5b26..c41326a 100644
--- a/common/cmd_pcmcia.c
+++ b/common/cmd_pcmcia.c
@@ -61,7 +61,7 @@
/* -------------------------------------------------------------------- */
-#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
+#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA)
extern int pcmcia_on (void);
extern int pcmcia_off (void);
@@ -99,7 +99,8 @@ U_BOOT_CMD(
#undef CHECK_IDE_DEVICE
-#if (CONFIG_COMMANDS & CFG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD)
+#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE)) \
+ && defined(CONFIG_IDE_8xx_PCCARD)
#define CHECK_IDE_DEVICE
#endif
diff --git a/common/cmd_portio.c b/common/cmd_portio.c
index d2e4c4b..6a07482 100644
--- a/common/cmd_portio.c
+++ b/common/cmd_portio.c
@@ -30,7 +30,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_PORTIO)
+#if (CONFIG_COMMANDS & CFG_CMD_PORTIO) || defined(CONFIG_CMD_PORTIO)
extern int cmd_get_data_size (char *arg, int default_size);
diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c
index f428f7e..57de0fe 100644
--- a/common/cmd_reginfo.c
+++ b/common/cmd_reginfo.c
@@ -32,7 +32,8 @@
#elif defined (CONFIG_MPC5200)
#include <mpc5xxx.h>
#endif
-#if (CONFIG_COMMANDS & CFG_CMD_REGINFO)
+
+#if (CONFIG_COMMANDS & CFG_CMD_REGINFO) || defined(CONFIG_CMD_REGINFO)
int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
@@ -341,7 +342,7 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if ( defined(CONFIG_8xx) || defined(CONFIG_405GP) || \
defined(CONFIG_405EP) || defined(CONFIG_MPC5200) ) && \
- (CONFIG_COMMANDS & CFG_CMD_REGINFO)
+ ((CONFIG_COMMANDS & CFG_CMD_REGINFO) || defined(CONFIG_CMD_REGINFO))
U_BOOT_CMD(
reginfo, 2, 1, do_reginfo,
diff --git a/common/cmd_reiser.c b/common/cmd_reiser.c
index 09c86e6..f54019b 100644
--- a/common/cmd_reiser.c
+++ b/common/cmd_reiser.c
@@ -28,7 +28,7 @@
*/
#include <common.h>
-#if (CONFIG_COMMANDS & CFG_CMD_REISER)
+#if (CONFIG_COMMANDS & CFG_CMD_REISER) || defined(CONFIG_CMD_REISER)
#include <config.h>
#include <command.h>
#include <image.h>
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 00b84fa..ac3d81c 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -34,7 +34,7 @@
#include <image.h>
#include <pci.h>
-#if (CONFIG_COMMANDS & CFG_CMD_SCSI)
+#if (CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI)
#ifdef CONFIG_SCSI_SYM53C8XX
#define SCSI_VEND_ID 0x1000
diff --git a/common/cmd_spi.c b/common/cmd_spi.c
index a6fdf7f..5874222 100644
--- a/common/cmd_spi.c
+++ b/common/cmd_spi.c
@@ -29,7 +29,7 @@
#include <command.h>
#include <spi.h>
-#if (CONFIG_COMMANDS & CFG_CMD_SPI)
+#if (CONFIG_COMMANDS & CFG_CMD_SPI) || defined(CONFIG_CMD_SPI)
/*-----------------------------------------------------------------------
* Definitions
diff --git a/common/cmd_universe.c b/common/cmd_universe.c
index 8d7b6fe..cc55dc9 100644
--- a/common/cmd_universe.c
+++ b/common/cmd_universe.c
@@ -28,7 +28,7 @@
#include <universe.h>
-#if (CONFIG_COMMANDS & CFG_CMD_UNIVERSE)
+#if (CONFIG_COMMANDS & CFG_CMD_UNIVERSE) || defined(CONFIG_CMD_UNIVERSE)
#define PCI_VENDOR PCI_VENDOR_ID_TUNDRA
#define PCI_DEVICE PCI_DEVICE_ID_TUNDRA_CA91C042
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 904df71..529938f 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -30,7 +30,7 @@
#include <asm/byteorder.h>
#include <part.h>
-#if (CONFIG_COMMANDS & CFG_CMD_USB)
+#if (CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB)
#include <usb.h>
@@ -612,7 +612,7 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif /* (CONFIG_COMMANDS & CFG_CMD_USB) */
-#if (CONFIG_COMMANDS & CFG_CMD_USB)
+#if (CONFIG_COMMANDS & CFG_CMD_USB) || defined(CONFIG_CMD_USB)
#ifdef CONFIG_USB_STORAGE
U_BOOT_CMD(
diff --git a/common/cmd_vfd.c b/common/cmd_vfd.c
index 5e623a2..fffb39c 100644
--- a/common/cmd_vfd.c
+++ b/common/cmd_vfd.c
@@ -35,7 +35,7 @@
#include <common.h>
#include <command.h>
-#if (CONFIG_COMMANDS & CFG_CMD_VFD)
+#if (CONFIG_COMMANDS & CFG_CMD_VFD) || defined(CONFIG_CMD_VFD)
#include <vfd_logo.h>
#define VFD_TEST_LOGO_BMPNR 0
diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index 8359153..e490243 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -24,7 +24,7 @@
* MA 02111-1307 USA
*/
-#if (CONFIG_COMMANDS & CFG_CMD_XIMG)
+#if (CONFIG_COMMANDS & CFG_CMD_XIMG) || defined(CONFIG_CMD_XIMG)
/*
* Multi Image extract
--
1.5.2.1.239.g75d8
More information about the U-Boot
mailing list