Signed-off-by: Wolfgang Denk <w...@denx.de>

---
v2: Fix building for TQM8548_BE

    On TQM8548_BE, building failed like that:
        Configuring for TQM85xx board...
        common/libcommon.a(cmd_mtdparts.o): In function 
`part_validate_eraseblock':
        /home/wd/git/u-boot/work/common/cmd_mtdparts.c:316: undefined reference 
to `get_mtd_device_nm'
        common/libcommon.a(cmd_mtdparts.o): In function `mtd_device_validate':
        /home/wd/git/u-boot/work/common/cmd_mtdparts.c:706: undefined reference 
to `get_mtd_device_nm'
        make: *** [u-boot] Error 1

    This was because CONFIG_CMD_MTDPARTS was defined after it was
    used. Move the part that uses it after the #define.
v3: Fix "undefined reference to `get_mtd_device_nm'" errors for
    non-8548 boards; build-tested with ELDK 4.2 on TQM8540, TQM8541,
    TQM8548, TQM8548_AG, TQM8548_BE, TQM8555 and TQM8560

 include/configs/TQM85xx.h |   51 ++++++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index 1fbf4bf..8f7fe0e 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -557,17 +557,40 @@
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#ifndef CONFIG_TQM8548_AG
+#define CONFIG_CMD_DATE
+#endif
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_CMD_NFS
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SNTP
+
+#if defined(CONFIG_PCI)
+#define CONFIG_CMD_PCI
+#endif
+
+#define CONFIG_MTD_DEVICE              /* needed for mtdparts commands */
+
 #ifdef CONFIG_NAND
 /*
  * Use NAND-FLash as JFFS2 device
  */
 #define CONFIG_CMD_NAND
-#define CONFIG_CMD_JFFS2
 
 #define        CONFIG_JFFS2_NAND       1
 
 #ifdef CONFIG_CMD_MTDPARTS
-#define CONFIG_MTD_DEVICE              /* needed for mtdparts commands */
 #define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT         "nand0=TQM85xx-nand"
 #define MTDPARTS_DEFAULT       "mtdparts=TQM85xx-nand:-"
@@ -579,29 +602,11 @@
 
 #endif /* CONFIG_NAND */
 
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_NFS
-#define CONFIG_CMD_SNTP
-#ifndef CONFIG_TQM8548_AG
-#define CONFIG_CMD_DATE
-#endif
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_DTT
-#define CONFIG_CMD_MII
-
-#if defined(CONFIG_PCI)
-#define CONFIG_CMD_PCI
-#endif
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
+
 /*
  * Miscellaneous configurable options
  */
-- 
1.6.0.6

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to