include/configs/[A-G]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_...
[platform/kernel/u-boot.git] / include / configs / MPC8360EMDS.h
index a8f2df9..b355f89 100644 (file)
@@ -10,7 +10,7 @@
  *
  * 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
+ * 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
 #define CFG_DDR_BASE           0x00000000 /* DDR is system memory */
 #define CFG_SDRAM_BASE         CFG_DDR_BASE
 #define CFG_DDR_SDRAM_BASE     CFG_DDR_BASE
+#define CFG_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
+                               DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
 
 #define CFG_83XX_DDR_USES_CS0
 
-#undef CONFIG_DDR_ECC          /* only for ECC DDR module */
+#define CONFIG_DDR_ECC         /* support DDR ECC function */
 #define CONFIG_DDR_ECC_CMD     /* Use DDR ECC user commands */
 
+/*
+ * DDRCDR - DDR Control Driver Register
+ */
+#define CFG_DDRCDR_VALUE       0x80080001
+
 #define CONFIG_SPD_EEPROM      /* Use SPD EEPROM for DDR setup */
 #if defined(CONFIG_SPD_EEPROM)
 /*
  * Manually set up DDR parameters
  */
 #define CFG_DDR_SIZE           256 /* MB */
+#if defined(CONFIG_DDR_II)
+#define CFG_DDRCDR             0x80080001
+#define CFG_DDR_CS0_BNDS       0x0000000f
+#define CFG_DDR_CS0_CONFIG     0x80330102
+#define CFG_DDR_TIMING_0       0x00220802
+#define CFG_DDR_TIMING_1       0x38357322
+#define CFG_DDR_TIMING_2       0x2f9048c8
+#define CFG_DDR_TIMING_3       0x00000000
+#define CFG_DDR_CLK_CNTL       0x02000000
+#define CFG_DDR_MODE           0x47d00432
+#define CFG_DDR_MODE2          0x8000c000
+#define CFG_DDR_INTERVAL       0x03cf0080
+#define CFG_DDR_SDRAM_CFG      0x43000000
+#define CFG_DDR_SDRAM_CFG2     0x00401000
+#else
 #define CFG_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_9)
 #define CFG_DDR_TIMING_1       0x37344321 /* tCL-tRCD-tRP-tRAS=2.5-3-3-7 */
 #define CFG_DDR_TIMING_2       0x00000800 /* may need tuning */
-#define CFG_DDR_CONTROL        0x42008000 /* Self refresh,2T timing */
+#define CFG_DDR_CONTROL                0x42008000 /* Self refresh,2T timing */
 #define CFG_DDR_MODE           0x20000162 /* DLL,normal,seq,4/2.5 */
 #define CFG_DDR_INTERVAL       0x045b0100 /* page mode */
 #endif
+#endif
 
 /*
  * Memory test
 #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
 #define CFG_RAMBOOT
 #else
-#undef  CFG_RAMBOOT
+#undef CFG_RAMBOOT
 #endif
 
 #define CFG_MONITOR_LEN                (256 * 1024) /* Reserve 256 kB for Mon */
 #define CFG_FLASH_CFI          /* use the Common Flash Interface */
 #define CFG_FLASH_CFI_DRIVER   /* use the CFI driver */
 #define CFG_FLASH_BASE         0xFE000000 /* FLASH base address */
-#define CFG_FLASH_SIZE         16 /* FLASH size is 16M */
+#define CFG_FLASH_SIZE         32 /* max FLASH size is 32M */
 
 #define CFG_LBLAWBAR0_PRELIM   CFG_FLASH_BASE /* Window base at flash base */
 #define CFG_LBLAWAR0_PRELIM    0x80000018 /* 32MB window size */
 #define CFG_BR0_PRELIM (CFG_FLASH_BASE | /* Flash Base address */ \
                        (2 << BR_PS_SHIFT) | /* 16 bit port size */ \
                        BR_V)   /* valid */
-#define CFG_OR0_PRELIM         0xfe006ff7 /* 16MB Flash size */
+#define CFG_OR0_PRELIM         ((~(CFG_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \
+                               OR_GPCM_CSNT | OR_GPCM_ACS_0b11 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \
+                               OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD)
 
 #define CFG_MAX_FLASH_BANKS    1 /* number of banks */
-#define CFG_MAX_FLASH_SECT     128 /* sectors per device */
+#define CFG_MAX_FLASH_SECT     256 /* max sectors per device */
 
 #undef CFG_FLASH_CHECKSUM
 
  */
 #define CFG_BCSR               0xF8000000
 #define CFG_LBLAWBAR1_PRELIM   CFG_BCSR /* Access window base at BCSR base */
-#define CFG_LBLAWAR1_PRELIM    0x8000000E /* Access window size 32K */
+#define CFG_LBLAWAR1_PRELIM    0x8000000F /* Access window size 64K */
 
 #define CFG_BR1_PRELIM         (CFG_BCSR|0x00000801) /* Port size=8bit, MSEL=GPCM */
 #define CFG_OR1_PRELIM         0xFFFFE9f7 /* length 32K */
  *    SDRAM for MSEL = BR2[24:26] = 011
  *    Valid = BR[31] = 1
  *
- * 0    4    8    12   16   20   24   28
+ * 0   4    8    12   16   20   24   28
  * 1111 0000 0000 0000 0001 1000 0110 0001 = f0001861
  *
  * CFG_LBC_SDRAM_BASE should be masked and OR'ed into
  *    64MB mask for AM, OR2[0:7] = 1111 1100
  *                XAM, OR2[17:18] = 11
  *    9 columns OR2[19-21] = 010
- *    13 rows   OR2[23-25] = 100
+ *    13 rows  OR2[23-25] = 100
  *    EAD set for extra time OR[31] = 1
  *
- * 0    4    8    12   16   20   24   28
+ * 0   4    8    12   16   20   24   28
  * 1111 1100 0000 0000 0110 1001 0000 0001 = fc006901
  */
 
 /*
  * LSDMR masks
  */
-#define CFG_LBC_LSDMR_OP_NORMAL        (0 << (31 - 4))
-#define CFG_LBC_LSDMR_OP_ARFRSH        (1 << (31 - 4))
-#define CFG_LBC_LSDMR_OP_SRFRSH        (2 << (31 - 4))
+#define CFG_LBC_LSDMR_OP_NORMAL (0 << (31 - 4))
+#define CFG_LBC_LSDMR_OP_ARFRSH (1 << (31 - 4))
+#define CFG_LBC_LSDMR_OP_SRFRSH (2 << (31 - 4))
 #define CFG_LBC_LSDMR_OP_MRW   (3 << (31 - 4))
 #define CFG_LBC_LSDMR_OP_PRECH (4 << (31 - 4))
-#define CFG_LBC_LSDMR_OP_PCHALL        (5 << (31 - 4))
-#define CFG_LBC_LSDMR_OP_ACTBNK        (6 << (31 - 4))
+#define CFG_LBC_LSDMR_OP_PCHALL (5 << (31 - 4))
+#define CFG_LBC_LSDMR_OP_ACTBNK (6 << (31 - 4))
 #define CFG_LBC_LSDMR_OP_RWINV (7 << (31 - 4))
 
 #define CFG_LBC_LSDMR_COMMON   0x0063b723
 /*
  * Windows to access PIB via local bus
  */
-#define CFG_LBLAWBAR3_PRELIM   0xf8008000 /* windows base 0xf8008000 */
-#define CFG_LBLAWAR3_PRELIM    0x8000000f /* windows size 64KB */
+#define CFG_LBLAWBAR3_PRELIM   0xf8010000 /* windows base 0xf8010000 */
+#define CFG_LBLAWAR3_PRELIM    0x8000000e /* windows size 32KB */
 
 /*
  * CS4 on Local Bus, to PIB
 #define CFG_NS16550_COM1       (CFG_IMMR+0x4500)
 #define CFG_NS16550_COM2       (CFG_IMMR+0x4600)
 
+#define CONFIG_CMDLINE_EDITING 1       /* add command line history     */
 /* Use the HUSH parser */
 #define CFG_HUSH_PARSER
-#ifdef  CFG_HUSH_PARSER
+#ifdef CFG_HUSH_PARSER
 #define CFG_PROMPT_HUSH_PS2 "> "
 #endif
 
 /* pass open firmware flat tree */
-#define CONFIG_OF_FLAT_TREE    1
+#define CONFIG_OF_LIBFDT       1
+#undef  CONFIG_OF_FLAT_TREE
 #define CONFIG_OF_BOARD_SETUP  1
+#define CONFIG_OF_HAS_BD_T     1
+#define CONFIG_OF_HAS_UBOOT_ENV        1
+
 
 /* maximum size of the flat tree (8K) */
 #define OF_FLAT_TREE_MAX_SIZE  8192
 
 #define OF_CPU                 "PowerPC,8360@0"
 #define OF_SOC                 "soc8360@e0000000"
+#define OF_QE                  "qe@e0100000"
 #define OF_TBCLK               (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH         "/soc8360@e0000000/serial@4500"
 
 /* I2C */
 #define CONFIG_HARD_I2C                /* I2C with hardware support */
 #undef CONFIG_SOFT_I2C         /* I2C bit-banged */
-#define CFG_I2C_SPEED  0x3F    /* I2C speed and slave address */
+#define CONFIG_FSL_I2C
+#define CFG_I2C_SPEED  400000  /* I2C speed and slave address */
 #define CFG_I2C_SLAVE  0x7F
 #define CFG_I2C_NOPROBES       {0x52} /* Don't probe these addrs */
 #define CFG_I2C_OFFSET 0x3000
-#define CFG_I2C2_OFFSET        0x3100
+#define CFG_I2C2_OFFSET 0x3100
 
 /*
  * Config on-board RTC
 
 #undef CONFIG_EEPRO100
 #undef CONFIG_PCI_SCAN_SHOW    /* show pci devices on startup */
-#define CFG_PCI_SUBSYS_VENDORID        0x1957  /* Freescale */
+#define CFG_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
 
 #endif /* CONFIG_PCI */
 
 #define CFG_UEC1_TX_CLK                QE_CLK9
 #define CFG_UEC1_ETH_TYPE      GIGA_ETH
 #define CFG_UEC1_PHY_ADDR      0
-#define CFG_UEC1_INTERFACE_MODE        ENET_1000_GMII
+#define CFG_UEC1_INTERFACE_MODE ENET_1000_GMII
 #endif
 
 #define CONFIG_UEC_ETH2                /* GETH2 */
 #define CFG_UEC2_TX_CLK                QE_CLK4
 #define CFG_UEC2_ETH_TYPE      GIGA_ETH
 #define CFG_UEC2_PHY_ADDR      1
-#define CFG_UEC2_INTERFACE_MODE        ENET_1000_GMII
+#define CFG_UEC2_INTERFACE_MODE ENET_1000_GMII
 #endif
 
 /*
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
        #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
-       #define CFG_ENV_SECT_SIZE       0x40000 /* 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 */
 #define CONFIG_LOADS_ECHO      1       /* echo on for serial download */
 #define CFG_LOADS_BAUD_CHANGE  1       /* allow baudrate change */
 
-#if defined(CFG_RAMBOOT)
-#if defined(CONFIG_PCI)
-#define  CONFIG_COMMANDS       ((CONFIG_CMD_DFL \
-                               | CFG_CMD_PING \
-                               | CFG_CMD_ASKENV \
-                                       | CFG_CMD_PCI \
-                               | CFG_CMD_I2C) \
-                               & \
-                               ~(CFG_CMD_ENV \
-                               | CFG_CMD_LOADS))
-#else
-#define  CONFIG_COMMANDS       ((CONFIG_CMD_DFL \
-                               | CFG_CMD_PING \
-                               | CFG_CMD_ASKENV \
-                               | CFG_CMD_I2C) \
-                               & \
-                               ~(CFG_CMD_ENV \
-                               | CFG_CMD_LOADS))
-#endif
-#else
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_ASKENV
+
 #if defined(CONFIG_PCI)
-#define  CONFIG_COMMANDS       (CONFIG_CMD_DFL \
-                               | CFG_CMD_PCI \
-                               | CFG_CMD_PING \
-                               | CFG_CMD_ASKENV \
-                               | CFG_CMD_I2C)
-#else
-#define  CONFIG_COMMANDS       (CONFIG_CMD_DFL \
-                               | CFG_CMD_PING \
-                               | CFG_CMD_ASKENV \
-                               | CFG_CMD_I2C  )
+    #define CONFIG_CMD_PCI
 #endif
+
+#if defined(CFG_RAMBOOT)
+    #undef CONFIG_CMD_ENV
+    #undef CONFIG_CMD_LOADS
 #endif
 
-#include <cmd_confdefs.h>
 
 #undef CONFIG_WATCHDOG         /* watchdog disabled */
 
 #define CFG_LOAD_ADDR          0x2000000 /* default load address */
 #define CFG_PROMPT             "=> "   /* Monitor Command Prompt */
 
-#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                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
 
 #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
 #if defined(CONFIG_UEC_ETH)
 #define CONFIG_ETHADDR 00:04:9f:ef:01:01
 #define CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR        00:04:9f:ef:01:02
+#define CONFIG_ETH1ADDR 00:04:9f:ef:01:02
 #endif
 
-#define CONFIG_BAUDRATE        115200
+#define CONFIG_BAUDRATE 115200
 
-#define CONFIG_LOADADDR        200000  /* default location for tftp and bootm */
+#define CONFIG_LOADADDR 200000 /* default location for tftp and bootm */
 
-#define CONFIG_BOOTDELAY 6     /* -1 disables auto-boot */
-#undef  CONFIG_BOOTARGS                /* the boot command will set bootargs */
+#define CONFIG_BOOTDELAY 6     /* -1 disables auto-boot */
+#undef CONFIG_BOOTARGS         /* the boot command will set bootargs */
 
-#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
-   "netdev=eth0\0"                                                      \
-   "consoledev=ttyS0\0"                                                 \
-   "ramdiskaddr=1000000\0"                                             \
+#define CONFIG_EXTRA_ENV_SETTINGS                                      \
+   "netdev=eth0\0"                                                     \
+   "consoledev=ttyS0\0"                                                        \
+   "ramdiskaddr=1000000\0"                                             \
    "ramdiskfile=ramfs.83xx\0"                                          \
    "fdtaddr=400000\0"                                                  \
-   "fdtfile=mpc8349emds.dtb\0"                                         \
+   "fdtfile=mpc8360emds.dtb\0"                                         \
    ""
 
-#define CONFIG_NFSBOOTCOMMAND                                          \
-   "setenv bootargs root=/dev/nfs rw "                                  \
-      "nfsroot=$serverip:$rootpath "                                    \
+#define CONFIG_NFSBOOTCOMMAND                                          \
+   "setenv bootargs root=/dev/nfs rw "                                 \
+      "nfsroot=$serverip:$rootpath "                                   \
       "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
-      "console=$consoledev,$baudrate $othbootargs;"                     \
-   "tftp $loadaddr $bootfile;"                                          \
+      "console=$consoledev,$baudrate $othbootargs;"                    \
+   "tftp $loadaddr $bootfile;"                                         \
    "tftp $fdtaddr $fdtfile;"                                           \
    "bootm $loadaddr - $fdtaddr"
 
 #define CONFIG_RAMBOOTCOMMAND                                          \
-   "setenv bootargs root=/dev/ram rw "                                  \
-      "console=$consoledev,$baudrate $othbootargs;"                     \
-   "tftp $ramdiskaddr $ramdiskfile;"                                    \
-   "tftp $loadaddr $bootfile;"                                          \
+   "setenv bootargs root=/dev/ram rw "                                 \
+      "console=$consoledev,$baudrate $othbootargs;"                    \
+   "tftp $ramdiskaddr $ramdiskfile;"                                   \
+   "tftp $loadaddr $bootfile;"                                         \
    "tftp $fdtaddr $fdtfile;"                                           \
    "bootm $loadaddr $ramdiskaddr $fdtaddr"