MPC5xxx: Change names of defines related to IPB and PCI clocks.
[platform/kernel/u-boot.git] / include / configs / TQM5200.h
index e0de5c1..7935593 100644 (file)
 
 #undef CONFIG_BOOTARGS
 
-#ifdef CONFIG_STK52XX
-# if defined(CONFIG_TQM5200_B)
-#  if defined(CFG_LOWBOOT)
-#   define ENV_UPDT                                                    \
-       "update=protect off FC000000 FC07FFFF;"                         \
-               "erase FC000000 FC07FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC07FFFF\0"
-#  else        /* highboot */
-#   define ENV_UPDT                                                    \
-       "update=protect off FFF00000 FFF7FFFF;"                         \
-               "erase FFF00000 FFF7FFFF;"                              \
+#if defined(CONFIG_TQM5200_B) && !defined(CFG_LOWBOOT)
+# define ENV_UPDT                                                      \
+       "update=protect off FFF00000 +${filesize};"                     \
+               "erase FFF00000 +${filesize};"                          \
                "cp.b 200000 FFF00000 ${filesize};"                     \
-               "protect on FFF00000 FFF7FFFF\0"
-#  endif /* CFG_LOWBOOT */
-# else /* !CONFIG_TQM5200_B */
-#  define ENV_UPDT                                                     \
-       "update=protect off FC000000 FC05FFFF;"                         \
-               "erase FC000000 FC05FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC05FFFF\0"
-# endif /* CONFIG_TQM5200_B */
-#elif defined (CONFIG_CAM5200)
+               "protect on FFF00000 +${filesize}\0"
+#else  /* default lowboot configuration */
 #   define ENV_UPDT                                                    \
-       "update=protect off FC000000 FC03FFFF;"                         \
-               "erase FC000000 FC03FFFF;"                              \
+       "update=protect off FC000000 +${filesize};"                     \
+               "erase FC000000 +${filesize};"                          \
                "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC03FFFF\0"
-#elif defined (CONFIG_FO300)
-#   define ENV_UPDT                                                    \
-       "update=protect off FC000000 FC05FFFF;"                         \
-               "erase FC000000 FC05FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC05FFFF\0"
+               "protect on FC000000 +${filesize}\0"
+#endif
+
+#ifndef CONFIG_CAM5200
+#define CUSTOM_ENV_SETTINGS                                            \
+       "bootfile=/tftpboot/tqm5200/uImage\0"                           \
+       "u-boot=/tftpboot/tqm5200/u-boot.bin\0"
 #else
-# error "Unknown Carrier Board"
-#endif /* CONFIG_STK52XX */
+#define CUSTOM_ENV_SETTINGS                                            \
+       "bootfile=cam5200/uImage\0"                                     \
+       "u-boot=cam5200/u-boot.bin\0"                                   \
+       "setup=tftp 200000 cam5200/setup.img; autoscr 200000\0"
+#endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        "netdev=eth0\0"                                                 \
                "bootm ${kernel_addr}\0"                                \
        "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addcons;"    \
                "bootm\0"                                               \
-       "bootfile=/tftpboot/tqm5200/uImage\0"                           \
-       "u-boot=/tftpboot/tqm5200/u-boot.bin\0"                         \
+       CUSTOM_ENV_SETTINGS                                             \
        "load=tftp 200000 ${u-boot}\0"                                  \
        ENV_UPDT                                                        \
        ""
 /*
  * IPB Bus clocking configuration.
  */
-#define CFG_IPBSPEED_133               /* define for 133MHz speed */
+#define CFG_IPBCLK_EQUALS_XLBCLK               /* define for 133MHz speed */
 
-#if defined(CFG_IPBSPEED_133)
+#if defined(CFG_IPBCLK_EQUALS_XLBCLK) && !defined(CONFIG_CAM5200)
 /*
  * PCI Bus clocking configuration
  *
  * Actually a PCI Clock of 66 MHz is only set (in cpu_init.c) if
- * CFG_IPBSPEED_133 is defined. This is because a PCI Clock of 66 MHz yet hasn't
- * been tested with a IPB Bus Clock of 66 MHz.
+ * CFG_IPBCLK_EQUALS_XLBCLK is defined. This is because a PCI Clock of
+ * 66 MHz yet hasn't been tested with a IPB Bus Clock of 66 MHz.
  */
-#define CFG_PCISPEED_66                        /* define for 66MHz speed */
+#define CFG_PCICLK_EQUALS_IPBCLK_DIV2  /* define for 66MHz speed */
 #endif
 
 /*
  */
 #define CFG_FLASH_BASE         0xFC000000
 
+#if defined(CONFIG_CAM5200) && defined(CONFIG_CAM5200_NIOSFLASH)
+#define CFG_MAX_FLASH_BANKS    2       /* max num of flash banks
+                                          (= chip selects) */
+#define CFG_FLASH_WORD_SIZE    unsigned int /* main flash device with */
+#define CFG_FLASH_ERASE_TOUT   120000  /* Timeout for Flash Erase (in ms) */
+#define CFG_FLASH_WRITE_TOUT   500     /* Timeout for Flash Write (in ms) */
+
+#define CFG_FLASH_ADDR0                0x555
+#define CFG_FLASH_ADDR1                0x2AA
+#define CFG_FLASH_2ND_16BIT_DEV        1       /* NIOS flash is a 16bit device */
+#define CFG_MAX_FLASH_SECT     128
+#else
 /* use CFI flash driver */
 #define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
 #define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
 #define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
+#define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks
+                                          (= chip selects) */
+#define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
+#endif
+
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */
-#define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
 #define CFG_FLASH_USE_BUFFER_WRITE     1
 
 #if defined (CONFIG_CAM5200)
 # define CFG_ENV_ADDR          (CFG_FLASH_BASE + 0x00060000)
 #endif
 
-#define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks
-                                          (= chip selects) */
-
 /* Dynamic MTD partition support */
 #define CONFIG_JFFS2_CMDLINE
 #define MTDIDS_DEFAULT         "nor0=TQM5200-0"
 #elif defined (CONFIG_CAM5200)
 #   define MTDPARTS_DEFAULT    "mtdparts=TQM5200-0:768k(firmware),"    \
                                                "1792k(kernel),"        \
-                                               "3584k(small-fs),"      \
-                                               "2m(initrd),"           \
-                                               "8m(misc),"             \
-                                               "16m(big-fs)"
+                                               "5632k(rootfs),"        \
+                                               "24m(home)"
 #elif defined (CONFIG_FO300)
 #   define MTDPARTS_DEFAULT    "mtdparts=TQM5200-0:640k(firmware),"    \
                                                "1408k(kernel),"        \
  */
 #define CFG_ENV_IS_IN_FLASH    1
 #define CFG_ENV_SIZE           0x4000  /* 16 k - keep small for fast booting */
-#if defined(CONFIG_TQM5200_B)
+#if defined(CONFIG_TQM5200_B) || defined (CONFIG_CAM5200)
 #define CFG_ENV_SECT_SIZE      0x40000
 #else
 #define CFG_ENV_SECT_SIZE      0x20000
 /*
  * GPIO configuration
  *
- * use pin gpio_wkup_6 as second SDRAM chip select (mem_cs1):
- *     Bit 0 (mask: 0x80000000): 1
+ * use CS1: Bit 0 (mask: 0x80000000):
+ *        1 -> Pin gpio_wkup_6 as second SDRAM chip select (mem_cs1).
  * use ALT CAN position: Bits 2-3 (mask: 0x30000000):
- *     00 -> No Alternatives, CAN1/2 on PSC2 according to PSC2 setting.
- *     01 -> CAN1 on I2C1, CAN2 on Tmr0/1.
- *           Use for REV200 STK52XX boards and FO300 boards. Do not use
- *           with REV100 modules (because, there I2C1 is used as I2C bus)
- * use PSC1 as UART: Bits 28-31 (mask: 0x00000007): 0100
- * use PSC2 as CAN: Bits 25:27 (mask: 0x00000030)
- *     000 -> All PSC2 pins are GIOPs
- *     001 -> CAN1/2 on PSC2 pins
- *            Use for REV100 STK52xx boards
- *     01x -> Use AC97
- * use PSC3: Bits 20-23 (mask: 0x00000f00)
- *     1100 -> UART/SPI (on FO300 board)
- * use PSC6:
- *   on STK52xx and FO300:
- *     use as UART. Pins PSC6_0 to PSC6_3 are used.
- *     Bits 9:11 (mask: 0x00700000):
- *        101 -> PSC6 : Extended POST test is not available
- *   on MINI-FAP and TQM5200_IB:
- *     use PSC6_0 to PSC6_3 as GPIO: Bits 9:11 (mask: 0x00700000):
- *        000 -> PSC6 could not be used as UART, CODEC or IrDA
- *   GPIO on PSC6_3 is used in post_hotkeys_pressed() to enable extended POST
- *   tests.
+ *       00 -> No Alternatives, CAN1/2 on PSC2 according to PSC2 setting.
+ *             SPI on PSC3 according to PSC3 setting. Use for CAM5200.
+ *       01 -> CAN1 on I2C1, CAN2 on Tmr0/1.
+ *             Use for REV200 STK52XX boards and FO300 boards. Do not use
+ *             with REV100 modules (because, there I2C1 is used as I2C bus).
+ * use ATA: Bits 6-7 (mask 0x03000000):
+ *       00 -> No ATA chip selects, csb_4/5 used as normal chip selects.
+ *             Use for CAM5200 board.
+ *       01 -> ATA cs0/1 on csb_4/5. Use for the remaining boards.
+ * use PSC6: Bits 9-11 (mask 0x00700000):
+ *      000 -> use PSC6_0 to PSC6_3 as GPIO, PSC6 could not be used as
+ *             UART, CODEC or IrDA.
+ *             GPIO on PSC6_3 is used in post_hotkeys_pressed() to
+ *             enable extended POST tests.
+ *             Use for MINI-FAP and TQM5200_IB boards.
+ *      101 -> use PSC6 as UART. Pins PSC6_0 to PSC6_3 are used.
+ *             Extended POST test is not available.
+ *             Use for STK52xx, FO300 and CAM5200 boards.
+ * use PCI_DIS: Bit 16 (mask 0x00008000):
+ *        1 -> disable PCI controller (on CAM5200 board).
+ * use USB: Bits 18-19 (mask 0x00003000):
+ *       10 -> two UARTs (on FO300 and CAM5200).
+ * use PSC3: Bits 20-23 (mask: 0x00000f00):
+ *     0000 -> All PSC3 pins are GPIOs.
+ *     1100 -> UART/SPI (on FO300 board).
+ *     0100 -> UART (on CAM5200 board).
+ * use PSC2: Bits 25:27 (mask: 0x00000030):
+ *      000 -> All PSC2 pins are GPIOs.
+ *      100 -> UART (on CAM5200 board).
+ *      001 -> CAN1/2 on PSC2 pins.
+ *             Use for REV100 STK52xx boards
+ *      01x -> Use AC97 (on FO300 board).
+ * use PSC1: Bits 29-31 (mask: 0x00000007):
+ *      100 -> UART (on all boards).
  */
 #if defined (CONFIG_MINIFAP)
 # define CFG_GPS_PORT_CONFIG   0x91000004
 # endif
 #elif defined (CONFIG_FO300)
 # define CFG_GPS_PORT_CONFIG   0x91502c24
+#elif defined (CONFIG_CAM5200)
+# define CFG_GPS_PORT_CONFIG   0x8050A444
 #else  /* TMQ5200 Inbetriebnahme-Board */
 # define CFG_GPS_PORT_CONFIG   0x81000004
 #endif
 #define CFG_LONGHELP                   /* undef to save memory     */
 #define CFG_PROMPT             "=> "   /* Monitor Command Prompt   */
 
+#define CONFIG_CMDLINE_EDITING 1       /* add command line history     */
 #define        CFG_HUSH_PARSER         1       /* use "hush" command parser    */
 #define        CFG_PROMPT_HUSH_PS2     "> "
 
 
 #define CFG_BOOTCS_START       CFG_FLASH_BASE
 #define CFG_BOOTCS_SIZE                CFG_FLASH_SIZE
-#ifdef CFG_PCISPEED_66
+#ifdef CFG_PCICLK_EQUALS_IPBCLK_DIV2
 #define CFG_BOOTCS_CFG         0x0008DF30 /* for pci_clk  = 66 MHz */
 #else
 #define CFG_BOOTCS_CFG         0x0004DF30 /* for pci_clk = 33 MHz */
 #define CFG_CS_BURST           0x00000000
 #define CFG_CS_DEADCYCLE       0x33333311      /* 1 dead cycle for flash and SM501 */
 
+#if defined(CONFIG_CAM5200)
+#define CFG_CS4_START          0xB0000000
+#define CFG_CS4_SIZE           0x00010000
+#define CFG_CS4_CFG            0x01019C10
+
+#define CFG_CS5_START          0xD0000000
+#define CFG_CS5_SIZE           0x01208000
+#define CFG_CS5_CFG            0x1414BF10
+#endif
+
 #define CFG_RESET_ADDRESS      0xff000000
 
 /*-----------------------------------------------------------------------