Merge with git://www.denx.de/git/u-boot.git
authorStefan Roese <sr@denx.de>
Wed, 15 Aug 2007 19:06:27 +0000 (21:06 +0200)
committerStefan Roese <sr@denx.de>
Wed, 15 Aug 2007 19:06:27 +0000 (21:06 +0200)
17 files changed:
1  2 
board/esd/ash405/ash405.c
board/esd/common/auto_update.c
board/esd/common/esd405ep_nand.c
board/esd/wuh405/wuh405.c
common/cmd_nand.c
drivers/nand/nand_ids.c
include/configs/ASH405.h
include/configs/CMS700.h
include/configs/CPCI405.h
include/configs/CPCI4052.h
include/configs/CPCI405AB.h
include/configs/CPCI405DT.h
include/configs/HH405.h
include/configs/HUB405.h
include/configs/PLU405.h
include/configs/VOH405.h
include/configs/WUH405.h

@@@ -23,7 -23,6 +23,7 @@@
  
  #include <common.h>
  #include <asm/processor.h>
 +#include <asm/io.h>
  #include <command.h>
  #include <malloc.h>
  
@@@ -34,7 -33,6 +34,7 @@@
  #endif
  
  extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 +extern void lxt971_no_sleep(void);
  
  /* fpga configuration data - gzip compressed and generated by bin2c */
  const unsigned char fpgadata[] =
@@@ -166,12 -164,18 +166,12 @@@ int misc_init_r (void
        /*
         * Reset external DUARTs
         */
 -      out32(GPIO0_OR, in32(GPIO0_OR) | CFG_DUART_RST); /* set reset to high */
 +      out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_DUART_RST);
        udelay(10); /* wait 10us */
 -      out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_DUART_RST); /* set reset to low */
 +      out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_DUART_RST);
        udelay(1000); /* wait 1ms */
  
        /*
 -       * Set NAND-FLASH GPIO signals to default
 -       */
 -      out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
 -      out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
 -
 -      /*
         * Enable interrupts in exar duart mcr[3]
         */
        *duart0_mcr = 0x08;
@@@ -214,18 -218,35 +214,17 @@@ long int initdram (int board_type
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
  
 -#if 0
 -      printf("\nmb0cf=%x\n", val); /* test-only */
 -      printf("strap=%x\n", mfdcr(strap)); /* test-only */
 -#endif
 -
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
  }
  
  /* ------------------------------------------------------------------------- */
  
 -int testdram (void)
 +void reset_phy(void)
  {
 -      /* TODO: XXX XXX XXX */
 -      printf ("test: 16 MB - ok\n");
 -
 -      return (0);
 -}
 -
 -/* ------------------------------------------------------------------------- */
 -
 -#if defined(CONFIG_CMD_NAND)
 -#include <linux/mtd/nand_legacy.h>
 -extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
 -
 -void nand_init(void)
 -{
 -      nand_probe(CFG_NAND_BASE);
 -      if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
 -              print_size(nand_dev_desc[0].totlen, "\n");
 -      }
 -}
 +#ifdef CONFIG_LXT971_NO_SLEEP
 +      /*
 +       * Disable sleep mode in LXT971
 +       */
 +      lxt971_no_sleep();
  #endif
 +}
  
  #include <common.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
  #warning CFG_NAND_LEGACY not defined in a file using the legacy NAND support!
  #endif
  
  #include <command.h>
  #include <image.h>
  #include <asm/byteorder.h>
 +#if defined(CFG_NAND_LEGACY)
  #include <linux/mtd/nand_legacy.h>
 +#endif
  #include <fat.h>
  #include <part.h>
  
@@@ -41,8 -39,8 +41,8 @@@
  
  #ifdef CONFIG_AUTO_UPDATE
  
- #if !(CONFIG_COMMANDS & CFG_CMD_FAT)
- #error "must define CFG_CMD_FAT"
+ #if !defined(CONFIG_CMD_FAT)
+ #error "must define CONFIG_CMD_FAT"
  #endif
  
  extern au_image_t au_image[];
@@@ -75,7 -73,7 +75,7 @@@ extern int flash_sect_erase(ulong, ulon
  extern int flash_sect_protect (int, ulong, ulong);
  extern int flash_write (char *, ulong, ulong);
  
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
  /* references to names in cmd_nand.c */
  #define NANDRW_READ   0x01
  #define NANDRW_WRITE  0x00
@@@ -85,7 -83,7 +85,7 @@@ extern struct nand_chip nand_dev_desc[]
  extern int nand_legacy_rw(struct nand_chip* nand, int cmd, size_t start, size_t len,
                   size_t * retlen, u_char * buf);
  extern int nand_legacy_erase(struct nand_chip* nand, size_t ofs, size_t len, int clean);
- #endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY) */
+ #endif
  
  extern block_dev_desc_t ide_dev_desc[CFG_IDE_MAXDEVICE];
  
@@@ -189,7 -187,7 +189,7 @@@ int au_do_update(int i, long sz
        int off, rc;
        uint nbytes;
        int k;
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
        int total;
  #endif
  
                        debug ("flash_sect_erase(%lx, %lx);\n", start, end);
                        flash_sect_erase(start, end);
                } else {
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
                        printf("Updating NAND FLASH with image %s\n", au_image[i].name);
                        debug ("nand_legacy_erase(%lx, %lx);\n", start, end);
                        rc = nand_legacy_erase (nand_dev_desc, start, end - start + 1, 0);
                        debug ("flash_write(%p, %lx %x)\n", addr, start, nbytes);
                        rc = flash_write((char *)addr, start, nbytes);
                } else {
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
                        debug ("nand_legacy_rw(%p, %lx %x)\n", addr, start, nbytes);
                        rc = nand_legacy_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2,
                                     start, nbytes, (size_t *)&total, (uchar *)addr);
                        debug ("nand_legacy_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes);
 +#else
 +                      rc = -1;
  #endif
                }
                if (rc != 0) {
                if (au_image[i].type != AU_NAND) {
                        rc = crc32 (0, (uchar *)(start + off), ntohl(hdr->ih_size));
                } else {
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY)
                        rc = nand_legacy_rw(nand_dev_desc, NANDRW_READ | NANDRW_JFFS2 | NANDRW_JFFS2_SKIP,
                                     start, nbytes, (size_t *)&total, (uchar *)addr);
                        rc = crc32 (0, (uchar *)(addr + off), ntohl(hdr->ih_size));
index 7ac4b83,0000000..7bf6847
mode 100644,000000..100644
--- /dev/null
@@@ -1,87 -1,0 +1,87 @@@
- #if (CONFIG_COMMANDS & CFG_CMD_NAND)
 +/*
 + * (C) Copyright 2007
 + * Matthias Fuchs, esd gmbh germany, matthias.fuchs@esd-electronics.com
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include <common.h>
 +
- #endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
++#if defined(CONFIG_CMD_NAND)
 +#include <asm/io.h>
 +#include <nand.h>
 +
 +/*
 + * hardware specific access to control-lines
 + */
 +static void esd405ep_nand_hwcontrol(struct mtd_info *mtdinfo, int cmd)
 +{
 +      switch(cmd) {
 +      case NAND_CTL_SETCLE:
 +              out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CLE);
 +              break;
 +      case NAND_CTL_CLRCLE:
 +              out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_NAND_CLE);
 +              break;
 +      case NAND_CTL_SETALE:
 +              out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_ALE);
 +              break;
 +      case NAND_CTL_CLRALE:
 +              out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_NAND_ALE);
 +              break;
 +      case NAND_CTL_SETNCE:
 +              out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_NAND_CE);
 +              break;
 +      case NAND_CTL_CLRNCE:
 +              out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CE);
 +              break;
 +      }
 +}
 +
 +
 +/*
 + * read device ready pin
 + */
 +static int esd405ep_nand_device_ready(struct mtd_info *mtdinfo)
 +{
 +      if (in_be32((void *)GPIO0_IR) & CFG_NAND_RDY)
 +              return 1;
 +      return 0;
 +}
 +
 +
 +int board_nand_init(struct nand_chip *nand)
 +{
 +      /*
 +       * Set NAND-FLASH GPIO signals to defaults
 +       */
 +      out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
 +      out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CE);
 +
 +      /*
 +       * Initialize nand_chip structure
 +       */
 +      nand->hwcontrol = esd405ep_nand_hwcontrol;
 +      nand->dev_ready = esd405ep_nand_device_ready;
 +      nand->eccmode = NAND_ECC_SOFT;
 +      nand->chip_delay = NAND_BIG_DELAY_US;
 +      nand->options = NAND_SAMSUNG_LP_OPTIONS;
 +      return 0;
 +}
++#endif
@@@ -170,6 -170,12 +170,6 @@@ int misc_init_r (void
        udelay(1000); /* wait 1ms */
  
        /*
 -       * Set NAND-FLASH GPIO signals to default
 -       */
 -      out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
 -      out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
 -
 -      /*
         * Enable interrupts in exar duart mcr[3]
         */
        *duart0_mcr = 0x08;
@@@ -212,7 -218,35 +212,5 @@@ long int initdram (int board_type
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
  
 -#if 0
 -      printf("\nmb0cf=%x\n", val); /* test-only */
 -      printf("strap=%x\n", mfdcr(strap)); /* test-only */
 -#endif
 -
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
  }
 -
 -/* ------------------------------------------------------------------------- */
 -
 -int testdram (void)
 -{
 -      /* TODO: XXX XXX XXX */
 -      printf ("test: 16 MB - ok\n");
 -
 -      return (0);
 -}
--
--/* ------------------------------------------------------------------------- */
 -
 -#if defined(CONFIG_CMD_NAND)
 -#include <linux/mtd/nand_legacy.h>
 -extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
 -
 -void nand_init(void)
 -{
 -      nand_probe(CFG_NAND_BASE);
 -      if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
 -              print_size(nand_dev_desc[0].totlen, "\n");
 -      }
 -}
 -#endif
diff --combined common/cmd_nand.c
   */
  #include <common.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_NAND)
+ #if defined(CONFIG_CMD_NAND)
  
  #include <command.h>
  #include <watchdog.h>
  #include <malloc.h>
  #include <asm/byteorder.h>
- #ifdef CONFIG_SHOW_BOOT_PROGRESS
- # include <status_led.h>
- # define SHOW_BOOT_PROGRESS(arg)      show_boot_progress(arg)
- #else
- # define SHOW_BOOT_PROGRESS(arg)
- #endif
  #include <jffs2/jffs2.h>
  #include <nand.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+ #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
  
  /* parition handling routines */
  int mtdparts_init(void);
@@@ -104,7 -96,7 +96,7 @@@ static in
  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 defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
        struct mtd_device *dev;
        struct part_info *part;
        u8 pnum;
                *size = nand->size - *off;
        }
  
- #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+ #if  defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
  out:
  #endif
        printf("device %d ", idx);
@@@ -476,65 -468,41 +468,68 @@@ static int nand_load_image(cmd_tbl_t *c
                           ulong offset, ulong addr, char *cmd)
  {
        int r;
 -      char *ep;
 +      char *ep, *s;
        ulong cnt;
        image_header_t *hdr;
 +      int jffs2 = 0;
 +
 +      s = strchr(cmd, '.');
 +      if (s != NULL &&
 +          (!strcmp(s, ".jffs2") || !strcmp(s, ".e") || !strcmp(s, ".i")))
 +              jffs2 = 1;
  
        printf("\nLoading from %s, offset 0x%lx\n", nand->name, offset);
  
        cnt = nand->oobblock;
 -      r = nand_read(nand, offset, &cnt, (u_char *) addr);
 +      if (jffs2) {
 +              nand_read_options_t opts;
 +              memset(&opts, 0, sizeof(opts));
 +              opts.buffer     = (u_char*) addr;
 +              opts.length     = cnt;
 +              opts.offset     = offset;
 +              opts.quiet      = 1;
 +              r = nand_read_opts(nand, &opts);
 +      } else {
 +              r = nand_read(nand, offset, &cnt, (u_char *) addr);
 +      }
 +
        if (r) {
                puts("** Read error\n");
-               SHOW_BOOT_PROGRESS(-1);
+               show_boot_progress (-56);
                return 1;
        }
+       show_boot_progress (56);
  
        hdr = (image_header_t *) addr;
  
        if (ntohl(hdr->ih_magic) != IH_MAGIC) {
                printf("\n** Bad Magic Number 0x%x **\n", hdr->ih_magic);
-               SHOW_BOOT_PROGRESS(-1);
+               show_boot_progress (-57);
                return 1;
        }
+       show_boot_progress (57);
  
        print_image_hdr(hdr);
  
        cnt = (ntohl(hdr->ih_size) + sizeof (image_header_t));
 +      if (jffs2) {
 +              nand_read_options_t opts;
 +              memset(&opts, 0, sizeof(opts));
 +              opts.buffer     = (u_char*) addr;
 +              opts.length     = cnt;
 +              opts.offset     = offset;
 +              opts.quiet      = 1;
 +              r = nand_read_opts(nand, &opts);
 +      } else {
 +              r = nand_read(nand, offset, &cnt, (u_char *) addr);
 +      }
  
 -      r = nand_read(nand, offset, &cnt, (u_char *) addr);
        if (r) {
                puts("** Read error\n");
-               SHOW_BOOT_PROGRESS(-1);
+               show_boot_progress (-58);
                return 1;
        }
+       show_boot_progress (58);
  
        /* Loading ok, update default load address */
  
@@@ -561,7 -529,7 +556,7 @@@ int do_nandboot(cmd_tbl_t * cmdtp, int 
        char *boot_device = NULL;
        int idx;
        ulong addr, offset = 0;
- #if (CONFIG_COMMANDS & CFG_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;
                        if (argc > 3)
                                goto usage;
                        if (argc == 3)
 -                              addr = simple_strtoul(argv[2], NULL, 16);
 +                              addr = simple_strtoul(argv[1], NULL, 16);
                        else
                                addr = CFG_LOAD_ADDR;
                        return nand_load_image(cmdtp, &nand_info[dev->id->num],
        }
  #endif
  
+       show_boot_progress(52);
        switch (argc) {
        case 1:
                addr = CFG_LOAD_ADDR;
                offset = simple_strtoul(argv[3], NULL, 16);
                break;
        default:
- #if (CONFIG_COMMANDS & CFG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
+ #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
  usage:
  #endif
                printf("Usage:\n%s\n", cmdtp->usage);
-               SHOW_BOOT_PROGRESS(-1);
+               show_boot_progress(-53);
                return 1;
        }
  
+       show_boot_progress(53);
        if (!boot_device) {
                puts("\n** No boot device **\n");
-               SHOW_BOOT_PROGRESS(-1);
+               show_boot_progress(-54);
                return 1;
        }
+       show_boot_progress(54);
  
        idx = simple_strtoul(boot_device, NULL, 16);
  
        if (idx < 0 || idx >= CFG_MAX_NAND_DEVICE || !nand_info[idx].name) {
                printf("\n** Device %d not available\n", idx);
-               SHOW_BOOT_PROGRESS(-1);
+               show_boot_progress(-55);
                return 1;
        }
+       show_boot_progress(55);
  
        return nand_load_image(cmdtp, &nand_info[idx], offset, addr, argv[0]);
  }
  
  U_BOOT_CMD(nboot, 4, 1, do_nandboot,
        "nboot   - boot from NAND device\n",
 -      "[partition] | [[[loadAddr] dev] offset]\n");
 +      "[.jffs2] [partition] | [[[loadAddr] dev] offset]\n");
  
- #endif                                /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
+ #endif
  
  #else /* CFG_NAND_LEGACY */
  /*
  #include <asm/io.h>
  #include <watchdog.h>
  
- #ifdef CONFIG_SHOW_BOOT_PROGRESS
+ #ifdef CONFIG_show_boot_progress
  # include <status_led.h>
- # define SHOW_BOOT_PROGRESS(arg)      show_boot_progress(arg)
+ # define show_boot_progress(arg)      show_boot_progress(arg)
  #else
- # define SHOW_BOOT_PROGRESS(arg)
+ # define show_boot_progress(arg)
  #endif
  
- #if (CONFIG_COMMANDS & CFG_CMD_NAND)
+ #if defined(CONFIG_CMD_NAND)
  #include <linux/mtd/nand_legacy.h>
  #if 0
  #include <linux/mtd/nand_ids.h>
@@@ -914,6 -886,7 +913,7 @@@ int do_nandboot (cmd_tbl_t *cmdtp, int 
        ulong offset = 0;
        image_header_t *hdr;
        int rcode = 0;
+       show_boot_progress (52);
        switch (argc) {
        case 1:
                addr = CFG_LOAD_ADDR;
                break;
        default:
                printf ("Usage:\n%s\n", cmdtp->usage);
-               SHOW_BOOT_PROGRESS (-1);
+               show_boot_progress (-53);
                return 1;
        }
  
+       show_boot_progress (53);
        if (!boot_device) {
                puts ("\n** No boot device **\n");
-               SHOW_BOOT_PROGRESS (-1);
+               show_boot_progress (-54);
                return 1;
        }
+       show_boot_progress (54);
  
        dev = simple_strtoul(boot_device, &ep, 16);
  
        if ((dev >= CFG_MAX_NAND_DEVICE) ||
            (nand_dev_desc[dev].ChipID == NAND_ChipID_UNKNOWN)) {
                printf ("\n** Device %d not available\n", dev);
-               SHOW_BOOT_PROGRESS (-1);
+               show_boot_progress (-55);
                return 1;
        }
+       show_boot_progress (55);
  
        printf ("\nLoading from device %d: %s at 0x%lx (offset 0x%lx)\n",
                dev, nand_dev_desc[dev].name, nand_dev_desc[dev].IO_ADDR,
        if (nand_legacy_rw (nand_dev_desc + dev, NANDRW_READ, offset,
                        SECTORSIZE, NULL, (u_char *)addr)) {
                printf ("** Read error on %d\n", dev);
-               SHOW_BOOT_PROGRESS (-1);
+               show_boot_progress (-56);
                return 1;
        }
+       show_boot_progress (56);
  
        hdr = (image_header_t *)addr;
  
                cnt -= SECTORSIZE;
        } else {
                printf ("\n** Bad Magic Number 0x%x **\n", ntohl(hdr->ih_magic));
-               SHOW_BOOT_PROGRESS (-1);
+               show_boot_progress (-57);
                return 1;
        }
+       show_boot_progress (57);
  
        if (nand_legacy_rw (nand_dev_desc + dev, NANDRW_READ,
                        offset + SECTORSIZE, cnt, NULL,
                        (u_char *)(addr+SECTORSIZE))) {
                printf ("** Read error on %d\n", dev);
-               SHOW_BOOT_PROGRESS (-1);
+               show_boot_progress (-58);
                return 1;
        }
+       show_boot_progress (58);
  
        /* Loading ok, update default load address */
  
@@@ -1012,6 -991,6 +1018,6 @@@ U_BOOT_CMD
        "loadAddr dev\n"
  );
  
- #endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) */
+ #endif
  
  #endif /* CFG_NAND_LEGACY */
diff --combined drivers/nand/nand_ids.c
@@@ -13,7 -13,7 +13,7 @@@
  
  #include <common.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
+ #if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
  
  #include <linux/mtd/nand.h>
  
@@@ -123,7 -123,6 +123,7 @@@ struct nand_manufacturers nand_manuf_id
        {NAND_MFR_NATIONAL, "National"},
        {NAND_MFR_RENESAS, "Renesas"},
        {NAND_MFR_STMICRO, "ST Micro"},
 +      {NAND_MFR_MICRON, "Micron"},
        {0x0, "Unknown"}
  };
  #endif
diff --combined include/configs/ASH405.h
  #define CONFIG_LOADS_ECHO     1       /* echo on for serial download  */
  #define CFG_LOADS_BAUD_CHANGE 1       /* allow baudrate change        */
  
 +#define CONFIG_NET_MULTI      1
 +#undef  CONFIG_HAS_ETH1
 +
  #define CONFIG_MII            1       /* MII PHY management           */
  #define CONFIG_PHY_ADDR               0       /* PHY address                  */
  #define CONFIG_LXT971_NO_SLEEP  1       /* disable sleep mode in LXT971 */
 +#define CONFIG_RESET_PHY_R      1       /* use reset_phy() to disable phy sleep mode */
  
  #define CONFIG_PHY_CLK_FREQ   EMAC_STACR_CLK_66MHZ /* 66 MHz OPB clock*/
  
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_BOOTFILESIZE
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
  
 -#define CFG_NAND_LEGACY
 -
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)        /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)        /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)        /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)        /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
  
 -#define CONFIG_MTD_NAND_VERIFY_WRITE 1  /* verify all writes!!!         */
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  /*-----------------------------------------------------------------------
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #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 --combined include/configs/CMS700.h
  #define CONFIG_LXT971_NO_SLEEP  1       /* disable sleep mode in LXT971 */
  #define CONFIG_RESET_PHY_R      1       /* use reset_phy() to disable phy sleep mode */
  
- #define CONFIG_BOOTP_MASK     (CONFIG_BOOTP_DEFAULT | \
-                                CONFIG_BOOTP_DNS | \
-                                CONFIG_BOOTP_DNS2 | \
-                                CONFIG_BOOTP_SEND_HOSTNAME )
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_BSP     | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_SUBNETMASK
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_DNS
+ #define CONFIG_BOOTP_DNS2
+ #define CONFIG_BOOTP_SEND_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_BSP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
 -#define CFG_NAND_LEGACY
 -
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_SDRAM_BANK0    1       /* init onboard SDRAM bank 0    */
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)        /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)        /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)        /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)        /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
 +
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
  
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+ #if defined(CONFIG_CMD_KGDB)
  #define CFG_CACHELINE_SHIFT   5       /* log base 2 of the above value        */
  #endif
  
  #define CONFIG_NET_MULTI      1
  #undef  CONFIG_HAS_ETH1
  
- #define CONFIG_BOOTP_MASK     (CONFIG_BOOTP_DEFAULT | \
-                                CONFIG_BOOTP_DNS | \
-                                CONFIG_BOOTP_DNS2 | \
-                                CONFIG_BOOTP_SEND_HOSTNAME )
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_SUBNETMASK
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_DNS
+ #define CONFIG_BOOTP_DNS2
+ #define CONFIG_BOOTP_SEND_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_EEPROM
  
  #define CONFIG_MAC_PARTITION
  #define CONFIG_DOS_PARTITION
  
  #define CONFIG_SUPPORT_VFAT
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
 -#define CFG_NAND_LEGACY
--
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_SDRAM_BANK0    1       /* init onboard SDRAM bank 0    */
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   */
  #define CFG_DCACHE_SIZE               8192    /* For AMCC 405 CPUs                    */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+ #if defined(CONFIG_CMD_KGDB)
  #define CFG_CACHELINE_SHIFT   5       /* log base 2 of the above value        */
  #endif
  
  
  #define CONFIG_RTC_M48T35A    1               /* ST Electronics M48 timekeeper */
  
- #define CONFIG_BOOTP_MASK     (CONFIG_BOOTP_DEFAULT | \
-                                CONFIG_BOOTP_DNS | \
-                                CONFIG_BOOTP_DNS2 | \
-                                CONFIG_BOOTP_SEND_HOSTNAME )
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_JFFS2   | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_BSP     | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_SUBNETMASK
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_DNS
+ #define CONFIG_BOOTP_DNS2
+ #define CONFIG_BOOTP_SEND_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_JFFS2
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_BSP
+ #define CONFIG_CMD_EEPROM
  
  #if 0 /* test-only */
  #define CONFIG_NETCONSOLE
  #define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
  #endif
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
 -#define CFG_NAND_LEGACY
--
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_SDRAM_BANK0    1       /* init onboard SDRAM bank 0    */
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+ #if defined(CONFIG_CMD_KGDB)
  #define CFG_CACHELINE_SHIFT   5       /* log base 2 of the above value        */
  #endif
  
  
  #define CONFIG_RTC_M48T35A    1               /* ST Electronics M48 timekeeper */
  
- #define CONFIG_BOOTP_MASK     (CONFIG_BOOTP_DEFAULT | \
-                                CONFIG_BOOTP_DNS | \
-                                CONFIG_BOOTP_DNS2 | \
-                                CONFIG_BOOTP_SEND_HOSTNAME )
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_JFFS2   | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_SUBNETMASK
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_DNS
+ #define CONFIG_BOOTP_DNS2
+ #define CONFIG_BOOTP_SEND_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_JFFS2
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
  #define CONFIG_MAC_PARTITION
  #define CONFIG_DOS_PARTITION
  
  #define CONFIG_SUPPORT_VFAT
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
 -#define CFG_NAND_LEGACY
 -
--
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_SDRAM_BANK0    1       /* init onboard SDRAM bank 0    */
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+ #if defined(CONFIG_CMD_KGDB)
  #define CFG_CACHELINE_SHIFT   5       /* log base 2 of the above value        */
  #endif
  
  
  #define CONFIG_RTC_M48T35A    1               /* ST Electronics M48 timekeeper */
  
- #define CONFIG_BOOTP_MASK     (CONFIG_BOOTP_DEFAULT | \
-                                CONFIG_BOOTP_DNS | \
-                                CONFIG_BOOTP_DNS2 | \
-                                CONFIG_BOOTP_SEND_HOSTNAME )
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_JFFS2   | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_BSP     | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_SUBNETMASK
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_DNS
+ #define CONFIG_BOOTP_DNS2
+ #define CONFIG_BOOTP_SEND_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_JFFS2
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_BSP
+ #define CONFIG_CMD_EEPROM
  
  #if 0 /* test-only */
  #define CONFIG_NETCONSOLE
  
  #undef  CONFIG_AUTO_UPDATE              /* autoupdate via compactflash  */
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
 -#define CFG_NAND_LEGACY
--
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_SDRAM_BANK0    1       /* init onboard SDRAM bank 0    */
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #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 --combined include/configs/HH405.h
  #define CONFIG_VIDEO_BMP_GZIP         /* gzip compressed bmp images   */
  #define CFG_VIDEO_LOGO_MAX_SIZE       (2 << 20)       /* for decompressed img */
  
- #define ADD_BMP_CMD           CFG_CMD_BMP
- #else
- #define ADD_BMP_CMD           0
  #endif /* CONFIG_VIDEO */
  
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_EXT2    | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               ADD_BMP_CMD     | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_BOOTFILESIZE
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_EXT2
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
+ #ifdef CONFIG_VIDEO
+ #define CONFIG_CMD_BMP
+ #endif
  
  #define CONFIG_MAC_PARTITION
  #define CONFIG_DOS_PARTITION
  #define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
  #undef CONFIG_AUTO_UPDATE_SHOW          /* use board show routine       */
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
 -#define CFG_NAND_LEGACY
--
  #undef  CONFIG_BZIP2   /* include support for bzip2 compressed images */
  #undef  CONFIG_WATCHDOG                       /* watchdog disabled            */
  
  #define       CFG_PROMPT_HUSH_PS2     "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)  /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)  /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)  /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)  /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
 +
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
  
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's    */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #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 --combined include/configs/HUB405.h
  
  #define CONFIG_PHY_CLK_FREQ   EMAC_STACR_CLK_66MHZ /* 66 MHz OPB clock*/
  
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_BOOTFILESIZE
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 -#define CFG_NAND_LEGACY
 -
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)        /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)        /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)        /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)        /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
 +
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
  
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #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 --combined include/configs/PLU405.h
  
  #define CONFIG_PHY_CLK_FREQ   EMAC_STACR_CLK_66MHZ /* 66 MHz OPB clock*/
  
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_BOOTFILESIZE
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
  #define CONFIG_MAC_PARTITION
  #define CONFIG_DOS_PARTITION
  #define CONFIG_SUPPORT_VFAT
  
  #define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
 -#define CONFIG_AUTO_UPDATE_SHOW 1       /* use board show routine       */
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_RTC_MC146818           /* DS1685 is MC146818 compatible*/
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 -#define CFG_NAND_LEGACY
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
  
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)        /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)        /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)        /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)        /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
  
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  
  #define CFG_FLASH_EMPTY_INFO          /* print 'E' for empty sector on flinfo */
  
 -#if 0 /* test-only */
 -#define CFG_JFFS2_FIRST_BANK  0           /* use for JFFS2 */
 -#define CFG_JFFS2_NUM_BANKS   1           /* ! second bank contains U-Boot */
 -#endif
 -
  /*-----------------------------------------------------------------------
   * Start addresses for the final memory configuration
   * (Set up by the startup code)
  #define CFG_ENV_SIZE          0x700   /* 2048 bytes may be used for env vars*/
                                   /* total size of a CAT24WC16 is 2048 bytes */
  
 -#define CFG_NVRAM_BASE_ADDR   0xF0000500              /* NVRAM base address   */
 -#define CFG_NVRAM_SIZE                242                     /* NVRAM size           */
 -
  /*-----------------------------------------------------------------------
   * I2C EEPROM (CAT24WC16) for environment
   */
  #define CFG_I2C_SLAVE         0x7F
  
  #define CFG_I2C_EEPROM_ADDR   0x50    /* EEPROM CAT24WC08             */
 -#if 1 /* test-only */
 +
  /* CAT24WC08/16... */
  #define CFG_I2C_EEPROM_ADDR_LEN 1     /* Bytes of address             */
  /* mask of address bits that overflow into the "EEPROM chip address"  */
  #define CFG_EEPROM_PAGE_WRITE_BITS 4  /* The Catalyst CAT24WC08 has   */
                                        /* 16 byte page write mode using*/
                                        /* last 4 bits of the address   */
 -#else
 -/* CAT24WC32/64... */
 -#define CFG_I2C_EEPROM_ADDR_LEN 2     /* Bytes of address             */
 -/* mask of address bits that overflow into the "EEPROM chip address"  */
 -#define CFG_I2C_EEPROM_ADDR_OVERFLOW  0x01
 -#define CFG_EEPROM_PAGE_WRITE_BITS 5  /* The Catalyst CAT24WC32 has   */
 -                                      /* 32 byte page write mode using*/
 -                                      /* last 5 bits of the address   */
 -#endif
  #define CFG_EEPROM_PAGE_WRITE_DELAY_MS        10   /* and takes up to 10 msec */
  #define CFG_EEPROM_PAGE_WRITE_ENABLE
  
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #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 --combined include/configs/VOH405.h
  
  #define CONFIG_PHY_CLK_FREQ   EMAC_STACR_CLK_66MHZ /* 66 MHz OPB clock*/
  
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_PCI     | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_IDE     | \
-                               CFG_CMD_FAT     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_BOOTFILESIZE
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_PCI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_IDE
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
  #define CONFIG_MAC_PARTITION
  #define CONFIG_DOS_PARTITION
  
  #define CONFIG_SUPPORT_VFAT
  
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CONFIG_RTC_MC146818           /* DS1685 is MC146818 compatible*/
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 -#define CFG_NAND_LEGACY
 -
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)        /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)        /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)        /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)        /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
 +
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
  
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #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 --combined include/configs/WUH405.h
  
  #define CONFIG_PHY_CLK_FREQ   EMAC_STACR_CLK_66MHZ /* 66 MHz OPB clock*/
  
- #define CONFIG_COMMANDS             ( CONFIG_CMD_DFL  | \
-                               CFG_CMD_DHCP    | \
-                               CFG_CMD_IRQ     | \
-                               CFG_CMD_ELF     | \
-                               CFG_CMD_NAND    | \
-                               CFG_CMD_DATE    | \
-                               CFG_CMD_I2C     | \
-                               CFG_CMD_MII     | \
-                               CFG_CMD_PING    | \
-                               CFG_CMD_EEPROM  )
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
+ /*
+  * BOOTP options
+  */
+ #define CONFIG_BOOTP_BOOTFILESIZE
+ #define CONFIG_BOOTP_BOOTPATH
+ #define CONFIG_BOOTP_GATEWAY
+ #define CONFIG_BOOTP_HOSTNAME
+ /*
+  * Command line configuration.
+  */
+ #include <config_cmd_default.h>
+ #define CONFIG_CMD_DHCP
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_ELF
+ #define CONFIG_CMD_NAND
+ #define CONFIG_CMD_DATE
+ #define CONFIG_CMD_I2C
+ #define CONFIG_CMD_MII
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_EEPROM
  
  #undef        CONFIG_WATCHDOG                 /* watchdog disabled            */
  
  #define CFG_PROMPT_HUSH_PS2   "> "
  #endif
  
- #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      */
   * NAND-FLASH stuff
   *-----------------------------------------------------------------------
   */
 -#define CFG_NAND_LEGACY
 -
 -#define CFG_MAX_NAND_DEVICE   1       /* Max number of NAND devices           */
 -#define SECTORSIZE 512
 -
 -#define ADDR_COLUMN 1
 -#define ADDR_PAGE 2
 -#define ADDR_COLUMN_PAGE 3
 -
 -#define NAND_ChipID_UNKNOWN   0x00
 -#define NAND_MAX_FLOORS 1
 -#define NAND_MAX_CHIPS 1
 -
 -#define CFG_NAND_CE  (0x80000000 >> 1)        /* our CE is GPIO1 */
 -#define CFG_NAND_CLE (0x80000000 >> 2)        /* our CLE is GPIO2 */
 -#define CFG_NAND_ALE (0x80000000 >> 3)        /* our ALE is GPIO3 */
 -#define CFG_NAND_RDY (0x80000000 >> 4)        /* our RDY is GPIO4 */
 -
 -#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
 -#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
 -#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
 -#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
 -#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
 -#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
 -
 -#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
 -#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
 -#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
 -
 -#define CONFIG_MTD_NAND_VERIFY_WRITE 1  /* verify all writes!!!         */
 +#define CFG_NAND_BASE_LIST    { CFG_NAND_BASE }
 +#define NAND_MAX_CHIPS          1
 +#define CFG_MAX_NAND_DEVICE   1         /* Max number of NAND devices */
 +#define NAND_BIG_DELAY_US     25
 +
 +#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
 +#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
 +#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
 +#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 +
  #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
  
  /*-----------------------------------------------------------------------
  #define CFG_DCACHE_SIZE               16384   /* For AMCC 405 CPUs, older 405 ppc's   */
                                        /* have only 8kB, 16kB is save here     */
  #define CFG_CACHELINE_SIZE    32      /* ...                  */
- #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+ #if defined(CONFIG_CMD_KGDB)
  #define CFG_CACHELINE_SHIFT   5       /* log base 2 of the above value        */
  #endif