Merge branch '080208_dupint' of git://linux-arm.org/u-boot-armdev
[platform/kernel/u-boot.git] / include / configs / TQM834x.h
index 4bbee97..024ecfa 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define DEBUG
-#undef DEBUG
-
 /*
  * High Level Configuration Options
  */
 #define CONFIG_E300            1       /* E300 Family */
 #define CONFIG_MPC83XX         1       /* MPC83XX family */
 #define CONFIG_MPC834X         1       /* MPC834X specific */
+#define CONFIG_MPC8349         1       /* MPC8349 specific */
 #define CONFIG_TQM834X         1       /* TQM834X board specific */
 
 /* IMMR Base Addres Register, use Freescale default: 0xff400000 */
-#define CFG_IMMRBAR            0xff400000
+#define CFG_IMMR               0xff400000
 
 /* System clock. Primary input clock when in PCI host mode */
 #define CONFIG_83XX_CLKIN      66666000        /* 66,666 MHz */
@@ -83,6 +81,7 @@
 #define CFG_FLASH_CFI_DRIVER                   /* use the CFI driver */
 #undef CFG_FLASH_CHECKSUM
 #define CFG_FLASH_BASE         0x80000000      /* start of FLASH   */
+#define CFG_FLASH_SIZE         8               /* FLASH size in MB */
 
 /* buffered writes in the AMD chip set is not supported yet */
 #undef CFG_FLASH_USE_BUFFER_WRITE
@@ -182,7 +181,7 @@ extern int tqm834x_num_flash_banks;
 #define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
 
 #define CFG_MONITOR_LEN                (256 * 1024) /* Reserve 256 kB for Mon */
-#define CFG_MALLOC_LEN         (128 * 1024) /* Reserved for malloc */
+#define CFG_MALLOC_LEN         (256 * 1024) /* Reserve 256 kB for malloc */
 
 /*
  * Serial Port
@@ -197,14 +196,15 @@ extern int tqm834x_num_flash_banks;
 #define CFG_BAUDRATE_TABLE  \
        {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
 
-#define CFG_NS16550_COM1       (CFG_IMMRBAR + 0x4500)
-#define CFG_NS16550_COM2       (CFG_IMMRBAR + 0x4600)
+#define CFG_NS16550_COM1       (CFG_IMMR + 0x4500)
+#define CFG_NS16550_COM2       (CFG_IMMR + 0x4600)
 
 /*
  * I2C
  */
 #define CONFIG_HARD_I2C                                /* I2C with hardware support    */
 #undef CONFIG_SOFT_I2C                         /* I2C bit-banged               */
+#define CONFIG_FSL_I2C
 #define CFG_I2C_SPEED                  400000  /* I2C speed: 400KHz            */
 #define CFG_I2C_SLAVE                  0x7F    /* slave address                */
 #define CFG_I2C_OFFSET                 0x3000
@@ -235,9 +235,9 @@ extern int tqm834x_num_flash_banks;
 #define CONFIG_MII
 
 #define CFG_TSEC1_OFFSET       0x24000
-#define CFG_TSEC1              (CFG_IMMRBAR + CFG_TSEC1_OFFSET)
+#define CFG_TSEC1              (CFG_IMMR + CFG_TSEC1_OFFSET)
 #define CFG_TSEC2_OFFSET       0x25000
-#define CFG_TSEC2              (CFG_IMMRBAR + CFG_TSEC2_OFFSET)
+#define CFG_TSEC2              (CFG_IMMR + CFG_TSEC2_OFFSET)
 
 #if defined(CONFIG_TSEC_ENET)
 
@@ -245,14 +245,16 @@ extern int tqm834x_num_flash_banks;
 #define CONFIG_NET_MULTI
 #endif
 
-#define CONFIG_MPC83XX_TSEC1           1
-#define CONFIG_MPC83XX_TSEC1_NAME      "TSEC0"
-#define CONFIG_MPC83XX_TSEC2           1
-#define CONFIG_MPC83XX_TSEC2_NAME      "TSEC1"
+#define CONFIG_TSEC1           1
+#define CONFIG_TSEC1_NAME      "TSEC0"
+#define CONFIG_TSEC2           1
+#define CONFIG_TSEC2_NAME      "TSEC1"
 #define TSEC1_PHY_ADDR                 2
 #define TSEC2_PHY_ADDR                 1
 #define TSEC1_PHYIDX                   0
 #define TSEC2_PHYIDX                   0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                        "TSEC0"
@@ -278,7 +280,6 @@ extern int tqm834x_num_flash_banks;
 #define CFG_PCI1_IO_PHYS        CFG_PCI1_IO_BASE
 #define CFG_PCI1_IO_SIZE        0x1000000       /* 16M */
 
-
 #undef CONFIG_EEPRO100
 #define CONFIG_EEPRO100
 #undef CONFIG_TULIP
@@ -301,7 +302,7 @@ extern int tqm834x_num_flash_banks;
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
        #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
-       #define CFG_ENV_SECT_SIZE       0x20000 /* 256K(one sector) for env */
+       #define CFG_ENV_SECT_SIZE       0x40000 /* 256K(one sector) for env */
        #define CFG_ENV_SIZE            0x2000
 #else
        #define CFG_NO_FLASH            1       /* Flash is not usable now */
@@ -313,38 +314,37 @@ extern int tqm834x_num_flash_banks;
 #define CONFIG_LOADS_ECHO              1       /* echo on for serial download */
 #define CFG_LOADS_BAUD_CHANGE          1       /* allow baudrate change */
 
-/* Common commands */
-#define CFG_CMD_TQM8349_COMMON CFG_CMD_DATE | CFG_CMD_I2C | CFG_CMD_DTT\
-                               | CFG_CMD_PING | CFG_CMD_EEPROM         \
-                               | CFG_CMD_MII | CFG_CMD_JFFS2
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
 
-#if defined(CFG_RAMBOOT)
 
-#if defined(CONFIG_PCI)
-#define  CONFIG_COMMANDS       ((CONFIG_CMD_DFL | CFG_CMD_PCI  \
-                               | CFG_CMD_TQM8349_COMMON)       \
-                               &                               \
-                               ~(CFG_CMD_ENV | CFG_CMD_LOADS))
-#else
-#define  CONFIG_COMMANDS       ((CONFIG_CMD_DFL                \
-                               | CFG_CMD_TQM8349_COMMON)       \
-                               &                               \
-                               ~(CFG_CMD_ENV | CFG_CMD_LOADS))
-#endif
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
 
-#else /* CFG_RAMBOOT */
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_JFFS2
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
 
 #if defined(CONFIG_PCI)
-#define  CONFIG_COMMANDS       (CONFIG_CMD_DFL | CFG_CMD_PCI   \
-                               | CFG_CMD_TQM8349_COMMON)
-#else
-#define  CONFIG_COMMANDS       (CONFIG_CMD_DFL                 \
-                               | CFG_CMD_TQM8349_COMMON)
+    #define CONFIG_CMD_PCI
 #endif
 
-#endif /* CFG_RAMBOOT */
-
-#include <cmd_confdefs.h>
+#if defined(CFG_RAMBOOT)
+    #undef CONFIG_CMD_ENV
+    #undef CONFIG_CMD_LOADS
+#endif
 
 /*
  * Miscellaneous configurable options
@@ -359,7 +359,7 @@ extern int tqm834x_num_flash_banks;
 #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 */
@@ -379,15 +379,6 @@ extern int tqm834x_num_flash_banks;
  */
 #define CFG_BOOTMAPSZ  (8 << 20)       /* Initial Memory map for Linux*/
 
-/*
- * Cache Configuration
- */
-#define CFG_DCACHE_SIZE                32768
-#define CFG_CACHELINE_SIZE     32
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
-#define CFG_CACHELINE_SHIFT    5       /*log base 2 of the above value*/
-#endif
-
 #define CFG_HRCW_LOW (\
        HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
        HRCWL_DDR_TO_SCB_CLK_1X1 |\
@@ -460,8 +451,8 @@ extern int tqm834x_num_flash_banks;
 #endif
 
 /* IMMRBAR */
-#define CFG_IBAT6L     (CFG_IMMRBAR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
-#define CFG_IBAT6U     (CFG_IMMRBAR | BATU_BL_1M | BATU_VS | BATU_VP)
+#define CFG_IBAT6L     (CFG_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
+#define CFG_IBAT6U     (CFG_IMMR | BATU_BL_1M | BATU_VS | BATU_VP)
 
 /* FLASH */
 #define CFG_IBAT7L     (CFG_FLASH_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
@@ -492,7 +483,7 @@ extern int tqm834x_num_flash_banks;
 #define BOOTFLAG_COLD          0x01    /* Normal Power-On: Boot from FLASH */
 #define BOOTFLAG_WARM          0x02    /* Software reboot */
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
 #define CONFIG_KGDB_BAUDRATE   230400  /* speed of kgdb serial port */
 #define CONFIG_KGDB_SER_INDEX  2       /* which serial port to use */
 #endif
@@ -501,23 +492,7 @@ extern int tqm834x_num_flash_banks;
  * Environment Configuration
  */
 
-#if defined(CONFIG_TSEC_ENET)
-#define CONFIG_ETHADDR         D2:DA:5E:44:BC:29
-#define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR                1E:F3:40:21:92:53
-#endif
-
-#define CONFIG_IPADDR          192.168.205.1
-
-#define CONFIG_HOSTNAME                tqm8349
-#define CONFIG_ROOTPATH                /opt/eldk/ppc_6xx
-#define CONFIG_BOOTFILE                /tftpboot/tqm83xx/uImage
-
-#define CONFIG_SERVERIP                192.168.1.1
-#define CONFIG_GATEWAYIP       192.168.1.1
-#define CONFIG_NETMASK         255.255.255.0
-
-#define CONFIG_LOADADDR                200000  /* default location for tftp and bootm */
+#define CONFIG_LOADADDR                400000  /* default location for tftp and bootm */
 
 #define CONFIG_BOOTDELAY       6       /* -1 disables auto-boot */
 #undef  CONFIG_BOOTARGS                        /* the boot command will set bootargs */
@@ -532,7 +507,7 @@ extern int tqm834x_num_flash_banks;
 
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
-       "hostname=tqm83xx\0"                                            \
+       "hostname=tqm834x\0"                                            \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
@@ -544,13 +519,13 @@ extern int tqm834x_num_flash_banks;
                "bootm ${kernel_addr}\0"                                \
        "flash_self=run ramargs addip addtty;"                          \
                "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
-       "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;"     \
+       "net_nfs=tftp 400000 ${bootfile};run nfsargs addip addtty;"     \
                "bootm\0"                                               \
        "rootpath=/opt/eldk/ppc_6xx\0"                                  \
-       "bootfile=/tftpboot/tqm83xx/uImage\0"                           \
+       "bootfile=/tftpboot/tqm834x/uImage\0"                           \
        "kernel_addr=80060000\0"                                        \
        "ramdisk_addr=80160000\0"                                       \
-       "load=tftp 100000 /tftpboot/tqm83xx/u-boot.bin\0"               \
+       "load=tftp 100000 /tftpboot/tqm834x/u-boot.bin\0"               \
        "update=protect off 80000000 8003ffff; "                        \
                "era 80000000 8003ffff; cp.b 100000 80000000 40000\0"   \
        "upd=run load;run update\0"                                     \
@@ -566,7 +541,7 @@ extern int tqm834x_num_flash_banks;
 #define MTDIDS_DEFAULT         "nor0=TQM834x-0"
 
 /* default mtd partition table */
-#define MTDPARTS_DEFAULT       "mtdparts=TQM834x-0:256k(u-boot),128k(env),"\
+#define MTDPARTS_DEFAULT       "mtdparts=TQM834x-0:256k(u-boot),256k(env),"\
                                                "1m(kernel),2m(initrd),"\
                                                "-(user);"\