Merge git://www.denx.de/git/u-boot
authorMichal Simek <monstr@monstr.eu>
Tue, 7 Aug 2007 20:12:05 +0000 (22:12 +0200)
committerMichal Simek <monstr@monstr.eu>
Tue, 7 Aug 2007 20:12:05 +0000 (22:12 +0200)
1  2 
Makefile
common/cmd_jffs2.c
common/cmd_mfsl.c
cpu/microblaze/cache.c
include/configs/ml401.h
include/configs/suzaku.h
include/configs/xupv2p.h

diff --combined Makefile
+++ b/Makefile
@@@ -143,7 -143,7 +143,7 @@@ ifeq ($(ARCH),m68k
  CROSS_COMPILE = m68k-elf-
  endif
  ifeq ($(ARCH),microblaze)
 -CROSS_COMPILE = mb-
 +CROSS_COMPILE = microblaze-uclinux-
  endif
  ifeq ($(ARCH),blackfin)
  CROSS_COMPILE = bfin-uclinux-
@@@ -198,17 -198,16 +198,18 @@@ ifeq ($(CPU),ixp
  LIBS += cpu/ixp/npe/libnpe.a
  endif
  LIBS += lib_$(ARCH)/lib$(ARCH).a
 -LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
 -      fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
 +LIBS += fs/cramfs/libcramfs.a fs/ext2/libext2fs.a fs/fat/libfat.a \
 +      fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a \
 +      fs/romfs/libromfs.a
  LIBS += net/libnet.a
  LIBS += disk/libdisk.a
  LIBS += rtc/librtc.a
  LIBS += dtt/libdtt.a
  LIBS += drivers/libdrivers.a
+ LIBS += drivers/bios_emulator/libatibiosemu.a
  LIBS += drivers/nand/libnand.a
  LIBS += drivers/nand_legacy/libnand_legacy.a
 +LIBS += drivers/net/libnetdrv.a
  ifeq ($(CPU),mpc83xx)
  LIBS += drivers/qe/qe.a
  endif
@@@ -318,14 -317,14 +319,14 @@@ depend dep
  tags ctags:
                ctags -w -o $(OBJTREE)/ctags `find $(SUBDIRS) include \
                                lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
 -                              fs/cramfs fs/fat fs/fdos fs/jffs2 \
 +                              fs/cramfs fs/fat fs/fdos fs/jffs2 fs/romfs\
                                net disk rtc dtt drivers drivers/sk98lin common \
                        \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  
  etags:
                etags -a -o $(OBJTREE)/etags `find $(SUBDIRS) include \
                                lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
 -                              fs/cramfs fs/fat fs/fdos fs/jffs2 \
 +                              fs/cramfs fs/fat fs/fdos fs/jffs2 fs/romfs\
                                net disk rtc dtt drivers drivers/sk98lin common \
                        \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
  
@@@ -431,7 -430,7 +432,7 @@@ jupiter_config:         unconfi
        @$(MKCONFIG) jupiter ppc mpc5xxx jupiter
  
  v38b_config: unconfig
-       @./mkconfig -a v38b ppc mpc5xxx v38b
+       @$(MKCONFIG) -a v38b ppc mpc5xxx v38b
  
  inka4x0_config:       unconfig
        @$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
@@@ -534,13 -533,8 +535,8 @@@ PM520_ROMBOOT_DDR_config: unconfi
  smmaco4_config: unconfig
        @$(MKCONFIG) -a smmaco4 ppc mpc5xxx tqm5200
  
- cm1_qp1_config:       unconfig
-       @ >include/config.h
-       @[ -z "$(findstring cm1_qp1,$@)" ] || \
-               {  echo "... with 64 MByte SDRAM" ; \
-                 echo "... with 32 MByte Flash" ; \
-               }
-       @./mkconfig -a cm1_qp1 ppc mpc5xxx cm1_qp1
+ cm5200_config:        unconfig
+       @./mkconfig -a cm5200 ppc mpc5xxx cm5200
  
  spieval_config:       unconfig
        @$(MKCONFIG) -a spieval ppc mpc5xxx tqm5200
@@@ -1037,9 -1031,8 +1033,8 @@@ acadia_config:  unconfi
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx acadia amcc
  
  acadia_nand_config:   unconfig
-       @mkdir -p $(obj)include
-       @mkdir -p $(obj)nand_spl
-       @mkdir -p $(obj)board/amcc/acadia
+       @mkdir -p $(obj)include $(obj)board/amcc/acadia
+       @mkdir -p $(obj)nand_spl/board/amcc/acadia
        @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
        @$(MKCONFIG) -n $@ -a acadia ppc ppc4xx acadia amcc
        @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/acadia/config.tmp
@@@ -1049,7 -1042,7 +1044,7 @@@ ADCIOP_config:  unconfi
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx adciop esd
  
  alpr_config:  unconfig
-       @./mkconfig $(@:_config=) ppc ppc4xx alpr prodrive
+       @$(MKCONFIG) $(@:_config=) ppc ppc4xx alpr prodrive
  
  AP1000_config:unconfig
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx ap1000 amirix
@@@ -1067,9 -1060,8 +1062,8 @@@ bamboo_config:  unconfi
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx bamboo amcc
  
  bamboo_nand_config:   unconfig
-       @mkdir -p $(obj)include
-       @mkdir -p $(obj)nand_spl
-       @mkdir -p $(obj)board/amcc/bamboo
+       @mkdir -p $(obj)include $(obj)board/amcc/bamboo
+       @mkdir -p $(obj)nand_spl/board/amcc/bamboo
        @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
        @$(MKCONFIG) -n $@ -a bamboo ppc ppc4xx bamboo amcc
        @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/bamboo/config.tmp
@@@ -1250,9 -1242,8 +1244,8 @@@ rainier_config: unconfi
  
  sequoia_nand_config \
  rainier_nand_config: unconfig
-       @mkdir -p $(obj)include
-       @mkdir -p $(obj)nand_spl
-       @mkdir -p $(obj)board/amcc/sequoia
+       @mkdir -p $(obj)include $(obj)board/amcc/sequoia
+       @mkdir -p $(obj)nand_spl/board/amcc/sequoia
        @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h
        @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
                tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h
        @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
  
  sc3_config:unconfig
-       @./mkconfig $(@:_config=) ppc ppc4xx sc3
+       @$(MKCONFIG) $(@:_config=) ppc ppc4xx sc3
  
  taishan_config:       unconfig
        @$(MKCONFIG) $(@:_config=) ppc ppc4xx taishan amcc
@@@ -1427,7 -1418,7 +1420,7 @@@ ep8260_config:  unconfi
        @$(MKCONFIG) $(@:_config=) ppc mpc8260 ep8260
  
  ep82xxm_config:       unconfig
-       @./mkconfig $(@:_config=) ppc mpc8260 ep82xxm
+       @$(MKCONFIG) $(@:_config=) ppc mpc8260 ep82xxm
  
  gw8260_config:        unconfig
        @$(MKCONFIG) $(@:_config=) ppc mpc8260 gw8260
@@@ -1668,14 -1659,15 +1661,15 @@@ r5200_config :               unconfi
  
  MPC8313ERDB_33_config \
  MPC8313ERDB_66_config: unconfig
-       @echo "" >include/config.h ; \
+       @mkdir -p $(obj)include
+       @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _33_,$@)" ] ; then \
-               echo -n "...33M ..." ; \
-               echo "#define CFG_33MHZ" >>include/config.h ; \
+               echo "...33M ..." ; \
+               echo "#define CFG_33MHZ" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _66_,$@)" ] ; then \
-               echo -n "...66M..." ; \
-               echo "#define CFG_66MHZ" >>include/config.h ; \
+               echo "...66M..." ; \
+               echo "#define CFG_66MHZ" >>$(obj)include/config.h ; \
        fi ;
        @$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb
  
@@@ -1683,23 -1675,24 +1677,24 @@@ MPC832XEMDS_config 
  MPC832XEMDS_HOST_33_config \
  MPC832XEMDS_HOST_66_config \
  MPC832XEMDS_SLAVE_config:     unconfig
-       @echo "" >include/config.h ; \
+       @mkdir -p $(obj)include
+       @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _HOST_,$@)" ] ; then \
-               echo -n "... PCI HOST " ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
+               echo "... PCI HOST " ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _SLAVE_,$@)" ] ; then \
                echo "...PCI SLAVE 66M"  ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
-               echo "#define CONFIG_PCISLAVE" >>include/config.h ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
+               echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _33_,$@)" ] ; then \
-               echo -n "...33M ..." ; \
-               echo "#define PCI_33M" >>include/config.h ; \
+               echo "...33M ..." ; \
+               echo "#define PCI_33M" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _66_,$@)" ] ; then \
-               echo -n "...66M..." ; \
-               echo "#define PCI_66M" >>include/config.h ; \
+               echo "...66M..." ; \
+               echo "#define PCI_66M" >>$(obj)include/config.h ; \
        fi ;
        @$(MKCONFIG) -a MPC832XEMDS ppc mpc83xx mpc832xemds
  
@@@ -1724,23 -1717,24 +1719,24 @@@ MPC8360EMDS_config 
  MPC8360EMDS_HOST_33_config \
  MPC8360EMDS_HOST_66_config \
  MPC8360EMDS_SLAVE_config:     unconfig
-       @echo "" >include/config.h ; \
+       @mkdir -p $(obj)include
+       @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _HOST_,$@)" ] ; then \
-               echo -n "... PCI HOST " ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
+               echo "... PCI HOST " ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _SLAVE_,$@)" ] ; then \
                echo "...PCI SLAVE 66M"  ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
-               echo "#define CONFIG_PCISLAVE" >>include/config.h ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
+               echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _33_,$@)" ] ; then \
-               echo -n "...33M ..." ; \
-               echo "#define PCI_33M" >>include/config.h ; \
+               echo "...33M ..." ; \
+               echo "#define PCI_33M" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _66_,$@)" ] ; then \
-               echo -n "...66M..." ; \
-               echo "#define PCI_66M" >>include/config.h ; \
+               echo "...66M..." ; \
+               echo "#define PCI_66M" >>$(obj)include/config.h ; \
        fi ;
        @$(MKCONFIG) -a MPC8360EMDS ppc mpc83xx mpc8360emds
  
@@@ -1766,10 -1760,10 +1762,10 @@@ MPC8540EVAL_66_slave_config:      uncon
        @mkdir -p $(obj)include
        @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _33_,$@)" ] ; then \
-               echo -n "... 33 MHz PCI" ; \
+               echo "... 33 MHz PCI" ; \
        else \
                echo "#define CONFIG_SYSCLK_66M" >>$(obj)include/config.h ; \
-               echo -n "... 66 MHz PCI" ; \
+               echo "... 66 MHz PCI" ; \
        fi ; \
        if [ "$(findstring _slave_,$@)" ] ; then \
                echo "#define CONFIG_PCI_SLAVE" >>$(obj)include/config.h ; \
@@@ -1863,7 -1857,7 +1859,7 @@@ TQM8560_config:         unconfi
  #########################################################################
  
  MPC8641HPCN_config:    unconfig
-       @./mkconfig $(@:_config=) ppc mpc86xx mpc8641hpcn
+       @$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8641hpcn
  
  
  #########################################################################
@@@ -2030,13 -2024,13 +2026,13 @@@ omap1610h2_cs3boot_config 
  omap1610h2_cs_autoboot_config:        unconfig
        @mkdir -p $(obj)include
        @if [ "$(findstring _cs0boot_, $@)" ] ; then \
-               echo "#define CONFIG_CS0_BOOT" >> .$(obj)/include/config.h ; \
+               echo "#define CONFIG_CS0_BOOT" >> .$(obj)include/config.h ; \
                echo "... configured for CS0 boot"; \
        elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \
-               echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)./include/config.h ; \
+               echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)include/config.h ; \
                echo "... configured for CS_AUTO boot"; \
        else \
-               echo "#define CONFIG_CS3_BOOT" >> $(obj)./include/config.h ; \
+               echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \
                echo "... configured for CS3 boot"; \
        fi;
        @$(MKCONFIG) -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn NULL omap
@@@ -2205,11 -2199,12 +2201,12 @@@ logodl_config        :       unconfi
  
  pdnb3_config \
  scpu_config:    unconfig
+       @mkdir -p $(obj)include
        @if [ "$(findstring scpu_,$@)" ] ; then \
-               echo "#define CONFIG_SCPU"      >>include/config.h ; \
+               echo "#define CONFIG_SCPU"      >>$(obj)include/config.h ; \
                echo "... on SCPU board variant" ; \
        else \
-               >include/config.h ; \
+               >$(obj)include/config.h ; \
        fi
        @$(MKCONFIG) -a pdnb3 arm ixp pdnb3 prodrive
  
@@@ -2431,14 -2426,16 +2428,16 @@@ suzaku_config:       unconfi
        @$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
  
  ml401_config: unconfig
-       @ >include/config.h
-       @echo "#define CONFIG_ML401 1" >> include/config.h
-       @./mkconfig -a $(@:_config=) microblaze microblaze ml401 xilinx
+       @mkdir -p $(obj)include
+       @ >$(obj)include/config.h
+       @echo "#define CONFIG_ML401 1" >> $(obj)include/config.h
+       @$(MKCONFIG) -a $(@:_config=) microblaze microblaze ml401 xilinx
  
  xupv2p_config:        unconfig
-       @ >include/config.h
-       @echo "#define CONFIG_XUPV2P 1" >> include/config.h
-       @./mkconfig -a $(@:_config=) microblaze microblaze xupv2p xilinx
+       @mkdir -p $(obj)include
+       @ >$(obj)include/config.h
+       @echo "#define CONFIG_XUPV2P 1" >> $(obj)include/config.h
+       @$(MKCONFIG) -a $(@:_config=) microblaze microblaze xupv2p xilinx
  
  #########################################################################
  ## Blackfin
@@@ -2463,7 -2460,7 +2462,7 @@@ bf561-ezkit_config:     unconfi
  #########################################################################
  
  atstk1002_config      :       unconfig
-       @./mkconfig $(@:_config=) avr32 at32ap atstk1000 atmel at32ap7000
+       @$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap7000
  
  #########################################################################
  #########################################################################
diff --combined common/cmd_jffs2.c
@@@ -85,7 -85,7 +85,7 @@@
   */
  
  /*
 - * JFFS2/CRAMFS support
 + * JFFS2/CRAMFS/ROMFS support
   */
  #include <common.h>
  #include <command.h>
  #include <linux/list.h>
  #include <linux/ctype.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+ #if defined(CONFIG_CMD_JFFS2)
  
  #include <cramfs/cramfs_fs.h>
  
- #if (CONFIG_COMMANDS & CFG_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
@@@ -175,11 -175,6 +175,11 @@@ extern int cramfs_load (char *loadoffse
  extern int cramfs_ls (struct part_info *info, char *filename);
  extern int cramfs_info (struct part_info *info);
  
 +extern int romfs_check (struct part_info *info);
 +extern int romfs_load (char *loadoffset, struct part_info *info, char *filename);
 +extern int romfs_ls (struct part_info *info, char *filename);
 +extern int romfs_info (struct part_info *info);
 +
  static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int part_num);
  
  /* command line only routines */
@@@ -326,7 -321,7 +326,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 defined(CONFIG_CMD_FLASH)
        /* info for FLASH chips */
        extern flash_info_t flash_info[];
        flash_info_t *flash;
   */
  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) && defined(CONFIG_CMD_NAND)
        /* info for NAND chips */
        nand_info_t *nand;
  
@@@ -724,7 -719,7 +724,7 @@@ static int part_parse(const char *cons
  static int device_validate(u8 type, u8 num, u32 *size)
  {
        if (type == MTD_DEV_TYPE_NOR) {
- #if (CONFIG_COMMANDS & CFG_CMD_FLASH)
+ #if defined(CONFIG_CMD_FLASH)
                if (num < CFG_MAX_FLASH_BANKS) {
                        extern flash_info_t flash_info[];
                        *size = flash_info[num].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) && defined(CONFIG_CMD_NAND)
                if (num < CFG_MAX_NAND_DEVICE) {
  #ifndef CFG_NAND_LEGACY
                        *size = nand_info[num].size;
@@@ -1879,22 -1874,14 +1879,22 @@@ int do_jffs2_fsload(cmd_tbl_t *cmdtp, i
  
        if ((part = jffs2_part_info(current_dev, current_partnum))){
  
 -              /* check partition type for cramfs */
 -              fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
 +              /* check partition type for JFFS2, cramfs, romfs */
 +              if (cramfs_check(part)) {
 +                      fsname = "CRAMFS";
 +              } else if (romfs_check(part)) {
 +                      fsname = "ROMFS";
 +              } else {
 +                      fsname = "JFFS2";
 +              }
                printf("### %s loading '%s' to 0x%lx\n", fsname, filename, offset);
  
                if (cramfs_check(part)) {
                        size = cramfs_load ((char *) offset, part, filename);
 +              } else if (romfs_check(part)){
 +                      size = romfs_load ((char *) offset, part, filename);
                } else {
 -                      /* if this is not cramfs assume jffs2 */
 +                      /* if this is not cramfs or romfs assume jffs2 */
                        size = jffs2_1pass_load((char *)offset, part, filename);
                }
  
@@@ -1941,10 -1928,8 +1941,10 @@@ int do_jffs2_ls(cmd_tbl_t *cmdtp, int f
                /* check partition type for cramfs */
                if (cramfs_check(part)) {
                        ret = cramfs_ls (part, filename);
 +              } else if (romfs_check(part)) {
 +                      ret = romfs_ls (part, filename);
                } else {
 -                      /* if this is not cramfs assume jffs2 */
 +                      /* if this is not cramfs or romfs assume jffs2 */
                        ret = jffs2_1pass_ls(part, filename);
                }
  
  int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  {
        struct part_info *part;
 -      char *fsname;
        int ret;
  
        /* make sure we are in sync with env variables */
        if ((part = jffs2_part_info(current_dev, current_partnum))){
  
                /* check partition type for cramfs */
 -              fsname = (cramfs_check(part) ? "CRAMFS" : "JFFS2");
 -              printf("### filesystem type is %s\n", fsname);
 +              puts("### filesystem type is ");
  
                if (cramfs_check(part)) {
 +                      puts("CRAMFS\n");
                        ret = cramfs_info (part);
 +              } else if (romfs_check(part)) {
 +                      puts("ROMFS\n");
 +                      ret = romfs_info (part);
                } else {
 -                      /* if this is not cramfs assume jffs2 */
 +                      /* if this is not cramfs or romfs assume jffs2 */
 +                      puts("JFFS2\n");
                        ret = jffs2_1pass_info(part);
                }
  
@@@ -2210,4 -2192,4 +2210,4 @@@ U_BOOT_CMD
  
  /***************************************************/
  
- #endif /* CFG_CMD_JFFS2 */
+ #endif
diff --combined common/cmd_mfsl.c
@@@ -30,7 -30,7 +30,7 @@@
  #include <config.h>
  #include <command.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_MFSL)
+ #if defined(CONFIG_CMD_MFSL)
  #include <asm/asm.h>
  
  int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
@@@ -357,7 -357,7 +357,7 @@@ int do_rspr (cmd_tbl_t * cmdtp, int fla
  
        reg = (unsigned int)simple_strtoul (argv[1], NULL, 16);
        val = (unsigned int)simple_strtoul (argv[2], NULL, 16);
 -      if (argc < 1) {
 +      if (argc < 2) {
                printf ("Usage:\n%s\n", cmdtp->usage);
                return 1;
        }
                puts ("ESR");
                break;
        default:
 +              puts ("Unsupported register\n");
                return 1;
        }
        printf (": 0x%08lx\n", val);
@@@ -409,10 -408,10 +409,10 @@@ U_BOOT_CMD (fwr, 4, 1, do_fwr
                " 3 - blocking control write\n");
  
  U_BOOT_CMD (rspr, 3, 1, do_rspr,
 -              "rmsr    - read/write special purpose register\n",
 +              "rspr    - read/write special purpose register\n",
                "- reg_num [write value] read/write special purpose register\n"
 -              " 0 - MSR - Machine status register\n"
 -              " 1 - EAR - Exception address register\n"
 -              " 2 - ESR - Exception status register\n");
 +              " 1 - MSR - Machine status register\n"
 +              " 3 - EAR - Exception address register\n"
 +              " 5 - ESR - Exception status register\n");
  
- #endif                                /* CONFIG_MICROBLAZE & CFG_CMD_MFSL */
+ #endif
diff --combined cpu/microblaze/cache.c
@@@ -1,7 -1,7 +1,7 @@@
  /*
   * (C) Copyright 2007 Michal Simek
   *
 - * Michal SIMEK <moonstr@monstr.eu>
 + * Michal SIMEK <monstr@monstr.eu>
   *
   * See file CREDITS for list of people who contributed to this
   * project.
@@@ -25,7 -25,7 +25,7 @@@
  #include <common.h>
  #include <asm/asm.h>
  
- #if (CONFIG_COMMANDS & CFG_CMD_CACHE)
+ #if defined(CONFIG_CMD_CACHE)
  
  int dcache_status (void)
  {
diff --combined include/configs/ml401.h
@@@ -32,7 -32,6 +32,7 @@@
  #define       CONFIG_ML401            1       /* ML401 Board */
  
  /* uart */
 +#define       XILINX_UARTLITE
  #define       CONFIG_SERIAL_BASE      XILINX_UART_BASEADDR
  #define       CONFIG_BAUDRATE         XILINX_UART_BAUDRATE
  #define       CFG_BAUDRATE_TABLE      { CONFIG_BAUDRATE }
@@@ -87,7 -86,7 +87,7 @@@
   * 0x11FB_F000        CFG_MONITOR_BASE
   *                                    MONITOR_CODE    256kB   Env
   * 0x13FF_F000        CFG_GBL_DATA_OFFSET
 - *                                    GLOBAL_DATA     4kB     bd, gd
 + *                                    GLOBAL_DATA     4kB     bd, gd
   * 0x1400_0000        CFG_SDRAM_BASE + CFG_SDRAM_SIZE
   */
  
  /* global pointer */
  #define       CFG_GBL_DATA_SIZE       0x1000  /* size of global data */
  /* start of global data */
 -#define       CFG_GBL_DATA_OFFSET     (CFG_SDRAM_BASE + CFG_SDRAM_SIZE - CFG_GBL_DATA_SIZE)
 +#define       CFG_GBL_DATA_OFFSET     (CFG_SDRAM_BASE + CFG_SDRAM_SIZE - CFG_GBL_DATA_SIZE)
  
  /* monitor code */
  #define       SIZE                    0x40000
        #define CFG_FLASH_PROTECTION            /* hardware flash protection */
  #endif /* !FLASH */
  
- #ifdef        FLASH
-       #ifdef  RAMENV
-       #define CONFIG_COMMANDS (CONFIG__CMD_DFL |\
-                               CFG_CMD_MEMORY |\
-                               CFG_CMD_MISC |\
-                               CFG_CMD_AUTOSCRIPT |\
-                               CFG_CMD_IRQ |\
-                               CFG_CMD_ASKENV |\
-                               CFG_CMD_BDI |\
-                               CFG_CMD_RUN |\
-                               CFG_CMD_LOADS |\
-                               CFG_CMD_LOADB |\
-                               CFG_CMD_IMI |\
-                               CFG_CMD_NET |\
-                               CFG_CMD_CACHE |\
-                               CFG_CMD_FAT |\
-                               CFG_CMD_EXT2 |\
-                               CFG_CMD_JFFS2 |\
-                               CFG_CMD_ECHO |\
-                               CFG_CMD_IMLS |\
-                               CFG_CMD_FLASH |\
-                               CFG_CMD_MFSL |\
-                               CFG_CMD_PING \
-                               )
-       #else   /* !RAMENV */
-       #define CONFIG_COMMANDS (CONFIG__CMD_DFL |\
-                               CFG_CMD_MEMORY |\
-                               CFG_CMD_MISC |\
-                               CFG_CMD_AUTOSCRIPT |\
-                               CFG_CMD_IRQ |\
-                               CFG_CMD_ASKENV |\
-                               CFG_CMD_BDI |\
-                               CFG_CMD_RUN |\
-                               CFG_CMD_LOADS |\
-                               CFG_CMD_LOADB |\
-                               CFG_CMD_IMI |\
-                               CFG_CMD_NET |\
-                               CFG_CMD_CACHE |\
-                               CFG_CMD_IMLS |\
-                               CFG_CMD_FLASH |\
-                               CFG_CMD_PING |\
-                               CFG_CMD_ENV |\
-                               CFG_CMD_FAT |\
-                               CFG_CMD_EXT2 |\
-                               CFG_CMD_JFFS2 |\
-                               CFG_CMD_ECHO |\
-                               CFG_CMD_MFSL |\
-                               CFG_CMD_SAVES \
-                               )
+ /*
+  * 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_ASKENV
+ #define CONFIG_CMD_AUTOSCRIPT
+ #define CONFIG_CMD_BDI
+ #define CONFIG_CMD_CACHE
+ #define CONFIG_CMD_EXT2
+ #define CONFIG_CMD_FAT
+ #define CONFIG_CMD_IMI
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_LOADB
+ #define CONFIG_CMD_LOADS
+ #define CONFIG_CMD_MEMORY
+ #define CONFIG_CMD_MISC
+ #define CONFIG_CMD_MFSL
+ #define CONFIG_CMD_NET
+ #define CONFIG_CMD_PING
+ #define CONFIG_CMD_RUN
+ #if defined(FLASH)
+       #define CONFIG_CMD_ECHO
+       #define CONFIG_CMD_FLASH
+       #define CONFIG_CMD_IMLS
+       #define CONFIG_CMD_JFFS2
+       #if !defined(RAMENV)
+               #define CONFIG_CMD_ENV
+               #define CONFIG_CMD_SAVES
        #endif
+ #endif
  
- #else /* !FLASH */
-       #define CONFIG_COMMANDS (CONFIG__CMD_DFL |\
-                               CFG_CMD_MEMORY |\
-                               CFG_CMD_MISC |\
-                               CFG_CMD_AUTOSCRIPT |\
-                               CFG_CMD_IRQ |\
-                               CFG_CMD_ASKENV |\
-                               CFG_CMD_BDI |\
-                               CFG_CMD_RUN |\
-                               CFG_CMD_LOADS |\
-                               CFG_CMD_FAT |\
-                               CFG_CMD_EXT2 |\
-                               CFG_CMD_LOADB |\
-                               CFG_CMD_IMI |\
-                               CFG_CMD_NET |\
-                               CFG_CMD_CACHE |\
-                               CFG_CMD_MFSL |\
-                               CFG_CMD_PING \
-                               )
- #endif        /* !FLASH */
- /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
- #include <cmd_confdefs.h>
- #if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+ #if defined(CONFIG_CMD_JFFS2)
  /* JFFS2 partitions */
  #define CONFIG_JFFS2_CMDLINE  /* mtdparts command line support */
  #define MTDIDS_DEFAULT                "nor0=ml401-0"
  #define       CONFIG_BOOTDELAY        30
  #define       CONFIG_BOOTARGS         "root=romfs"
  #define       CONFIG_HOSTNAME         "ml401"
 -#define       CONFIG_BOOTCOMMAND      "base 0;tftp 11000000 image.img;bootm"
 +#define       CONFIG_BOOTCOMMAND      "base 0;tftp 11000000 image.img;bootm"
  #define       CONFIG_IPADDR           192.168.0.3
 -#define       CONFIG_SERVERIP         192.168.0.5
 -#define       CONFIG_GATEWAYIP        192.168.0.1
 +#define       CONFIG_SERVERIP         192.168.0.5
 +#define       CONFIG_GATEWAYIP        192.168.0.1
  #define       CONFIG_ETHADDR          00:E0:0C:00:00:FD
  
  /* architecture dependent code */
diff --combined include/configs/suzaku.h
@@@ -48,7 -48,6 +48,7 @@@
  #define CFG_MALLOC_LEN                (256 << 10)     /* Reserve 256 kB for malloc */
  #define CFG_MALLOC_BASE               (CFG_MONITOR_BASE - (1024 * 1024))
  
 +#define XILINX_UARTLITE
  #define CONFIG_BAUDRATE               115200
  #define CFG_BAUDRATE_TABLE    { 115200 }
  
  #define MICROBLAZE_SYSREG_BASE_ADDR 0xFFFFA000
  #define MICROBLAZE_SYSREG_RECONFIGURE (1 << 0)
  
- #define CONFIG_COMMANDS               (CONFIG__CMD_DFL)
  
- /* 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 CFG_UART1_BASE                (0xFFFF2000)
  #define CONFIG_SERIAL_BASE    CFG_UART1_BASE
  #define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  #define CFG_INIT_SP_OFFSET    CFG_GBL_DATA_OFFSET
  
 +#define XILINX_CLOCK_FREQ     50000000
 +
  #endif        /* __CONFIG_H */
diff --combined include/configs/xupv2p.h
  #define       CONFIG_XUPV2P           1
  
  /* uart */
 -#define       CONFIG_SERIAL_BASE      XILINX_UART_BASEADDR
 -#define       CONFIG_BAUDRATE         XILINX_UART_BAUDRATE
 +#ifdef XILINX_UARTLITE_BASEADDR
 +#define       XILINX_UARTLITE
 +#define       CONFIG_SERIAL_BASE      XILINX_UARTLITE_BASEADDR
 +#define       CONFIG_BAUDRATE         XILINX_UARTLITE_BAUDRATE
  #define       CFG_BAUDRATE_TABLE      { CONFIG_BAUDRATE }
 +#else
 +#ifdef XILINX_UART16550_BASEADDR
 +#define CFG_NS16550
 +#define CFG_NS16550_SERIAL
 +#define CFG_NS16550_REG_SIZE  4
 +#define CONFIG_CONS_INDEX     1
 +#define CFG_NS16550_COM1      XILINX_UART16550_BASEADDR
 +#define CFG_NS16550_CLK               XILINX_UART16550_CLOCK_HZ
 +
 +#define       CONFIG_BAUDRATE         115200
 +#define       CFG_BAUDRATE_TABLE      { 9600, 115200 }
 +#endif
 +#endif
  
  /* ethernet */
 -#define CONFIG_EMAC   1
 -#define XPAR_EMAC_0_DEVICE_ID XPAR_XEMAC_NUM_INSTANCES
 +#ifdef XILINX_EMAC_BASEADDR
 +#define XILINX_EMAC   1
 +#else
 +#ifdef XILINX_EMACLITE_BASEADDR
 +#define XILINX_EMACLITE       1
 +#endif
 +#endif
 +#undef ET_DEBUG
  
  /*
   * setting reset address
   * U-BOOT auto-relocate to TEXT_BASE. After RESET command Microblaze
   * jump to CFG_RESET_ADDRESS where is the original U-BOOT code.
   */
 -#define       CFG_RESET_ADDRESS       0x36000000
 +/* #define    CFG_RESET_ADDRESS       0x36000000 */
  
  /* gpio */
 +#ifdef XILINX_GPIO_BASEADDR
  #define       CFG_GPIO_0              1
  #define       CFG_GPIO_0_ADDR         XILINX_GPIO_BASEADDR
 +#endif
  
  /* interrupt controller */
  #define       CFG_INTC_0              1
  #define       CFG_ENV_IS_NOWHERE      1
  #define       CFG_ENV_SIZE            0x1000
  #define       CFG_ENV_ADDR            (CFG_MONITOR_BASE - CFG_ENV_SIZE)
- #ifndef XILINX_SYSACE_BASEADDR
- #define       CONFIG_COMMANDS (CONFIG__CMD_DFL |\
-                       CFG_CMD_MEMORY |\
-                       CFG_CMD_IRQ |\
-                       CFG_CMD_BDI |\
-                       CFG_CMD_NET |\
-                       CFG_CMD_IMI |\
-                       CFG_CMD_ECHO |\
-                       CFG_CMD_CACHE |\
-                       CFG_CMD_RUN |\
-                       CFG_CMD_AUTOSCRIPT |\
-                       CFG_CMD_ASKENV |\
-                       CFG_CMD_LOADS |\
-                       CFG_CMD_LOADB |\
-                       CFG_CMD_MISC |\
-                       CFG_CMD_MFSL |\
-                       CFG_CMD_PING \
-                       )
- #else
- #define       CONFIG_COMMANDS (CONFIG__CMD_DFL |\
-                       CFG_CMD_MEMORY |\
-                       CFG_CMD_IRQ |\
-                       CFG_CMD_BDI |\
-                       CFG_CMD_NET |\
-                       CFG_CMD_IMI |\
-                       CFG_CMD_ECHO |\
-                       CFG_CMD_CACHE |\
-                       CFG_CMD_RUN |\
-                       CFG_CMD_AUTOSCRIPT |\
-                       CFG_CMD_ASKENV |\
-                       CFG_CMD_LOADS |\
-                       CFG_CMD_LOADB |\
-                       CFG_CMD_MISC |\
-                       CFG_CMD_FAT |\
-                       CFG_CMD_EXT2 |\
-                       CFG_CMD_MFSL |\
-                       CFG_CMD_PING \
-                       )
- #endif
  
- /* 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_MEMORY
+ #define CONFIG_CMD_IRQ
+ #define CONFIG_CMD_BDI
+ #define CONFIG_CMD_NET
+ #define CONFIG_CMD_IMI
+ #define CONFIG_CMD_ECHO
+ #define CONFIG_CMD_CACHE
+ #define CONFIG_CMD_RUN
+ #define CONFIG_CMD_AUTOSCRIPT
+ #define CONFIG_CMD_ASKENV
+ #define CONFIG_CMD_LOADS
+ #define CONFIG_CMD_LOADB
+ #define CONFIG_CMD_MISC
 -#define CONFIG_CMD_FAT
 -#define CONFIG_CMD_EXT2
+ #define CONFIG_CMD_PING
++#define CONFIG_CMD_MFSL
++#ifdef XILINX_SYSACE_BASEADDR
++#define CONFIG_CMD_EXT2
++#define CONFIG_CMD_FAT
++#endif
  
  /* Miscellaneous configurable options */
  #define       CFG_PROMPT      "U-Boot-mONStR> "
  
  #define       CONFIG_BOOTDELAY        30
  #define       CONFIG_BOOTARGS         "root=romfs"
 -#define       CONFIG_HOSTNAME         "ml401"
 +#define       CONFIG_HOSTNAME         "xupv2p"
  #define       CONFIG_BOOTCOMMAND      "base 0;tftp 11000000 image.img;bootm"
  #define       CONFIG_IPADDR           192.168.0.3
  #define       CONFIG_SERVERIP         192.168.0.5
        "echo"
  
  /* system ace */
 +#ifdef XILINX_SYSACE_BASEADDR
  #define       CONFIG_SYSTEMACE
  /* #define DEBUG_SYSTEMACE */
  #define       SYSTEMACE_CONFIG_FPGA
  #define       CFG_SYSTEMACE_BASE      XILINX_SYSACE_BASEADDR
  #define       CFG_SYSTEMACE_WIDTH     XILINX_SYSACE_MEM_WIDTH
  #define       CONFIG_DOS_PARTITION
 +#endif
  
  #endif        /* __CONFIG_H */