Merge with git://www.denx.de/git/u-boot.git
[platform/kernel/u-boot.git] / include / configs / TQM834x.h
index 0fad36a..661712b 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
  * When CFG_MAX_FLASH_BANKS_DETECT is defined, the actual number of Flash
  * banks has to be determined at runtime and stored in a gloabl variable
  * tqm834x_num_flash_banks. The value of CFG_MAX_FLASH_BANKS_DETECT is only
- * used insted of CFG_MAX_FLASH_BANKS to allocate the array flash_info, and
+ * used instead of CFG_MAX_FLASH_BANKS to allocate the array flash_info, and
  * should be made sufficiently large to accomodate the number of banks that
- * might acutally be detected.  Since most (all?) Flash related functions use
+ * might actually be detected.  Since most (all?) Flash related functions use
  * CFG_MAX_FLASH_BANKS as the number of actual banks on the board, it is
  * defined as tqm834x_num_flash_banks.
  */
 #define CFG_MAX_FLASH_BANKS_DETECT     2
-#ifndef __ASSEMBLY__ 
+#ifndef __ASSEMBLY__
 extern int tqm834x_num_flash_banks;
 #endif
 #define CFG_MAX_FLASH_BANKS (tqm834x_num_flash_banks)
@@ -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,11 +245,11 @@ 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 TSEC1_PHY_ADDR                 0
+#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
@@ -278,8 +278,8 @@ 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
 
 #if !defined(CONFIG_PCI_PNP)
@@ -312,38 +312,36 @@ 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
 
 #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
@@ -352,7 +350,13 @@ extern int tqm834x_num_flash_banks;
 #define CFG_LOAD_ADDR          0x2000000       /* default load address */
 #define CFG_PROMPT             "=> "           /* Monitor Command Prompt */
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CONFIG_CMDLINE_EDITING 1       /* add command line history     */
+#define CFG_HUSH_PARSER                1       /* Use the HUSH parser          */
+#ifdef CFG_HUSH_PARSER
+#define        CFG_PROMPT_HUSH_PS2     "> "
+#endif
+
+#if defined(CONFIG_CMD_KGDB)
        #define CFG_CBSIZE      1024            /* Console I/O Buffer Size */
 #else
        #define CFG_CBSIZE      256             /* Console I/O Buffer Size */
@@ -377,7 +381,7 @@ extern int tqm834x_num_flash_banks;
  */
 #define CFG_DCACHE_SIZE                32768
 #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
 
@@ -416,10 +420,66 @@ extern int tqm834x_num_flash_banks;
        HRCWH_TSEC2M_IN_GMII )
 #endif
 
+/* System IO Config */
+#define CFG_SICRH      SICRH_TSOBI1
+#define CFG_SICRL      SICRL_LDP_A
+
 /* i-cache and d-cache disabled */
-#define CFG_HID0_INIT          0x000000000
-#define CFG_HID0_FINAL         CFG_HID0_INIT
-#define CFG_HID2               0x000000000
+#define CFG_HID0_INIT  0x000000000
+#define CFG_HID0_FINAL CFG_HID0_INIT
+#define CFG_HID2       HID2_HBE
+
+/* DDR 0 - 512M */
+#define CFG_IBAT0L     (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT0U     (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
+#define CFG_IBAT1L     (CFG_SDRAM_BASE + 0x10000000 | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT1U     (CFG_SDRAM_BASE + 0x10000000 | BATU_BL_256M | BATU_VS | BATU_VP)
+
+/* stack in DCACHE @ 512M (no backing mem) */
+#define CFG_IBAT2L     (CFG_INIT_RAM_ADDR | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT2U     (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP)
+
+/* PCI */
+#ifdef CONFIG_PCI
+#define CFG_IBAT3L     (CFG_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT3U     (CFG_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
+#define CFG_IBAT4L     (CFG_PCI1_MEM_BASE + 0x10000000 | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CFG_IBAT4U     (CFG_PCI1_MEM_BASE + 0x10000000 | BATU_BL_256M | BATU_VS | BATU_VP)
+#define CFG_IBAT5L     (CFG_PCI1_IO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
+#define CFG_IBAT5U     (CFG_PCI1_IO_BASE + 0x10000000 | BATU_BL_16M | BATU_VS | BATU_VP)
+#else
+#define CFG_IBAT3L     (0)
+#define CFG_IBAT3U     (0)
+#define CFG_IBAT4L     (0)
+#define CFG_IBAT4U     (0)
+#define CFG_IBAT5L     (0)
+#define CFG_IBAT5U     (0)
+#endif
+
+/* IMMRBAR */
+#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)
+#define CFG_IBAT7U     (CFG_FLASH_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
+
+#define CFG_DBAT0L     CFG_IBAT0L
+#define CFG_DBAT0U     CFG_IBAT0U
+#define CFG_DBAT1L     CFG_IBAT1L
+#define CFG_DBAT1U     CFG_IBAT1U
+#define CFG_DBAT2L     CFG_IBAT2L
+#define CFG_DBAT2U     CFG_IBAT2U
+#define CFG_DBAT3L     CFG_IBAT3L
+#define CFG_DBAT3U     CFG_IBAT3U
+#define CFG_DBAT4L     CFG_IBAT4L
+#define CFG_DBAT4U     CFG_IBAT4U
+#define CFG_DBAT5L     CFG_IBAT5L
+#define CFG_DBAT5U     CFG_IBAT5U
+#define CFG_DBAT6L     CFG_IBAT6L
+#define CFG_DBAT6U     CFG_IBAT6U
+#define CFG_DBAT7L     CFG_IBAT7L
+#define CFG_DBAT7U     CFG_IBAT7U
 
 /*
  * Internal Definitions
@@ -429,7 +489,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
@@ -471,17 +531,17 @@ extern int tqm834x_num_flash_banks;
        "netdev=eth0\0"                                                 \
        "hostname=tqm83xx\0"                                            \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
-               "nfsroot=$(serverip):$(rootpath)\0"                     \
+               "nfsroot=${serverip}:${rootpath}\0"                     \
        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
-       "addip=setenv bootargs $(bootargs) "                            \
-               "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)"      \
-               ":$(hostname):$(netdev):off panic=1\0"                  \
-       "addtty=setenv bootargs $(bootargs) console=ttyS0,$(baudrate)\0"\
+       "addip=setenv bootargs ${bootargs} "                            \
+               "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
+               ":${hostname}:${netdev}:off panic=1\0"                  \
+       "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
        "flash_nfs=run nfsargs addip addtty;"                           \
-               "bootm $(kernel_addr)\0"                                \
+               "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;"     \
+               "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
+       "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;"     \
                "bootm\0"                                               \
        "rootpath=/opt/eldk/ppc_6xx\0"                                  \
        "bootfile=/tftpboot/tqm83xx/uImage\0"                           \