]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/configs/MPC8349ITX.h
DEBUG: Fix debug macros
[karo-tx-uboot.git] / include / configs / MPC8349ITX.h
index 5e1ddaedd63126105e89ef4623e8a1e3cbf494fb..c57facfecf45026f4a2325e8dedd1d22f94391b1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
+ * Copyright (C) Freescale Semiconductor, Inc. 2006.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#if (TEXT_BASE == 0xFE000000)
+#if (CONFIG_SYS_TEXT_BASE == 0xFE000000)
 #define CONFIG_SYS_LOWBOOT
 #endif
 
 /*
  * High Level Configuration Options
  */
-#define CONFIG_MPC834X         /* MPC834x family (8343, 8347, 8349) */
+#define CONFIG_MPC83xx         1
+#define CONFIG_MPC834x         /* MPC834x family (8343, 8347, 8349) */
 #define CONFIG_MPC8349         /* MPC8349 specific */
 
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xFEF00000
+#endif
+
 #define CONFIG_SYS_IMMR                0xE0000000      /* The IMMR is relocated to here */
 
 #define CONFIG_MISC_INIT_F
@@ -79,6 +84,7 @@
 #define CONFIG_COMPACT_FLASH   /* The CF card interface on the back of the board */
 #define CONFIG_VSC7385_ENET    /* VSC7385 ethernet support */
 #define CONFIG_SATA_SIL3114    /* SIL3114 SATA controller */
+#define CONFIG_SYS_USB_HOST    /* use the EHCI USB controller */
 #endif
 
 #define CONFIG_PCI
 
 #define CONFIG_FSL_I2C
 #define CONFIG_I2C_MULTI_BUS
-#define CONFIG_I2C_CMD_TREE
 #define CONFIG_SYS_I2C_OFFSET          0x3000
 #define CONFIG_SYS_I2C2_OFFSET         0x3100
 #define CONFIG_SYS_SPD_BUS_NUM         1       /* The I2C bus for SPD */
+#define CONFIG_SYS_RTC_BUS_NUM         1       /* The I2C bus for RTC */
 
 #define CONFIG_SYS_I2C_8574_ADDR1      0x20    /* I2C1, PCF8574 */
 #define CONFIG_SYS_I2C_8574_ADDR2      0x21    /* I2C1, PCF8574 */
 
 #endif
 
+#ifdef CONFIG_SYS_USB_HOST
+/*
+ * Support USB
+ */
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_FSL
+
+/* Current USB implementation supports the only USB controller,
+ * so we have to choose between the MPH or the DR ones */
+#if 1
+#define CONFIG_HAS_FSL_MPH_USB
+#else
+#define CONFIG_HAS_FSL_DR_USB
+#endif
+
+#endif
+
 /*
  * DDR Setup
  */
 #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL  (DDR_SDRAM_CLK_CNTL_SS_EN | \
                                DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075)
 
+#define CONFIG_VERY_BIG_RAM
+#define CONFIG_MAX_MEM_MAPPED   ((phys_size_t)256 << 20)
+
 #ifdef CONFIG_HARD_I2C
 #define CONFIG_SPD_EEPROM              /* use SPD EEPROM for DDR setup*/
 #endif
@@ -268,7 +296,7 @@ boards, we say we have two, but don't display a message if we find only one. */
 /*
  * U-Boot memory configuration
  */
-#define CONFIG_SYS_MONITOR_BASE        TEXT_BASE       /* start of monitor */
+#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE    /* start of monitor */
 
 #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
 #define CONFIG_SYS_RAMBOOT
@@ -278,14 +306,13 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #define CONFIG_SYS_INIT_RAM_LOCK
 #define CONFIG_SYS_INIT_RAM_ADDR       0xFD000000      /* Initial RAM address */
-#define CONFIG_SYS_INIT_RAM_END        0x1000          /* End of used area in RAM*/
+#define CONFIG_SYS_INIT_RAM_SIZE       0x1000          /* Size of used area in RAM*/
 
-#define CONFIG_SYS_GBL_DATA_SIZE       0x100           /* num bytes initial data */
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
-#define CONFIG_SYS_MONITOR_LEN         (256 * 1024) /* Reserve 256 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN         (384 * 1024) /* Reserve 384 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN          (128 * 1024) /* Reserved for malloc */
 
 /*
@@ -294,7 +321,8 @@ boards, we say we have two, but don't display a message if we find only one. */
  * External Local Bus rate is
  *    CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
  */
-#define CONFIG_SYS_LCRR        (LCRR_DBYP | LCRR_CLKDIV_4)
+#define CONFIG_SYS_LCRR_DBYP   LCRR_DBYP
+#define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
 #define CONFIG_SYS_LBC_LBCR    0x00000000
 
 #define CONFIG_SYS_LBC_LSRT    0x32000000    /* LB sdram refresh timer, about 6us */
@@ -304,7 +332,6 @@ boards, we say we have two, but don't display a message if we find only one. */
  * Serial Port
  */
 #define CONFIG_CONS_INDEX      1
-#undef CONFIG_SERIAL_SOFTWARE_FIFO
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    1
@@ -357,16 +384,8 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_SYS_PCI2_IO_SIZE        0x01000000      /* 16M */
 #endif
 
-#define _IO_BASE               0x00000000      /* points to PCI I/O space */
-
-#define CONFIG_NET_MULTI
 #define CONFIG_PCI_PNP                 /* do pci plug-and-play */
 
-#ifdef CONFIG_RTL8139
-/* This macro is used by RTL8139 but not defined in PPC architecture */
-#define KSEG1ADDR(x)       (x)
-#endif
-
 #ifndef CONFIG_PCI_PNP
     #define PCI_ENET0_IOADDR   0x00000000
     #define PCI_ENET0_MEMADDR  CONFIG_SYS_PCI2_MEM_BASE
@@ -377,8 +396,8 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #endif
 
-#define PCI_66M
-#ifdef PCI_66M
+#define CONFIG_PCI_66M
+#ifdef CONFIG_PCI_66M
 #define CONFIG_83XX_CLKIN      66666666        /* in Hz */
 #else
 #define CONFIG_83XX_CLKIN      33333333        /* in Hz */
@@ -388,7 +407,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #ifdef CONFIG_TSEC_ENET
 
-#define CONFIG_NET_MULTI
 #define CONFIG_MII
 #define CONFIG_PHY_GIGE                /* In case CONFIG_CMD_MII is specified */
 
@@ -457,11 +475,14 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
 #define CONFIG_CMD_SDRAM
 
-#if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114)
+#if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) \
+    || defined(CONFIG_USB_STORAGE)
     #define CONFIG_DOS_PARTITION
     #define CONFIG_CMD_FAT
+    #define CONFIG_SUPPORT_VFAT
 #endif
 
 #ifdef CONFIG_COMPACT_FLASH
@@ -470,6 +491,9 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #ifdef CONFIG_SATA_SIL3114
     #define CONFIG_CMD_SATA
+#endif
+
+#if defined(CONFIG_SATA_SIL3114) || defined(CONFIG_USB_STORAGE)
     #define CONFIG_CMD_EXT2
 #endif
 
@@ -488,12 +512,13 @@ boards, we say we have two, but don't display a message if we find only one. */
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP                    /* undef to save memory */
-#define CONFIG_CMDLINE_EDITING         /* Command-line editing */
+#define CONFIG_CMDLINE_EDITING                 /* Command-line editing */
+#define CONFIG_AUTO_COMPLETE                   /* add autocompletion support */
 #define CONFIG_SYS_HUSH_PARSER                 /* Use the HUSH parser */
 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
 
 #define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
-#define CONFIG_LOADADDR        500000  /* default location for tftp and bootm */
+#define CONFIG_LOADADDR        800000  /* default location for tftp and bootm */
 
 #ifdef CONFIG_MPC8349ITX
 #define CONFIG_SYS_PROMPT      "MPC8349E-mITX> "       /* Monitor Command Prompt */
@@ -514,10 +539,10 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 /*
  * For booting Linux, the board info and command line data
- * have to be in the first 8 MB of memory, since this is
+ * have to be in the first 256 MB of memory, since this is
  * the maximum mapped by the Linux kernel during initialization.
  */
-#define CONFIG_SYS_BOOTMAPSZ   (8 << 20)       /* Initial Memory map for Linux*/
+#define CONFIG_SYS_BOOTMAPSZ   (256 << 20)     /* Initial Memory map for Linux*/
 
 #define CONFIG_SYS_HRCW_LOW (\
        HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
@@ -563,15 +588,17 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_SYS_SPCR_TSEC2EP        3       /* TSEC2 emergency priority (0-3) */
 #define CONFIG_SYS_SCCR_TSEC1CM        1       /* TSEC1 clock mode (0-3) */
 #define CONFIG_SYS_SCCR_TSEC2CM        1       /* TSEC2 & I2C0 clock mode (0-3) */
+#define CONFIG_SYS_SCCR_USBMPHCM 3     /* USB MPH controller's clock */
+#define CONFIG_SYS_SCCR_USBDRCM        0       /* USB DR controller's clock */
 
 /*
  * System IO Config
  */
 #define CONFIG_SYS_SICRH SICRH_TSOBI1  /* Needed for gigabit to work on TSEC 1 */
-#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1)
+#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1)    /* USB DR as device + USB MPH as host */
 
-#define CONFIG_SYS_HID0_INIT   0x000000000
-#define CONFIG_SYS_HID0_FINAL  CONFIG_SYS_HID0_INIT
+#define CONFIG_SYS_HID0_INIT   0x00000000
+#define CONFIG_SYS_HID0_FINAL  HID0_ENABLE_INSTRUCTION_CACHE
 
 #define CONFIG_SYS_HID2        HID2_HBE
 #define CONFIG_HIGH_BATS       1       /* High BATs supported */
@@ -610,7 +637,8 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_SYS_IBAT5U      (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
 
 /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
-#define CONFIG_SYS_IBAT6L      (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE)
+#define CONFIG_SYS_IBAT6L      (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \
+                                BATL_GUARDEDSTORAGE)
 #define CONFIG_SYS_IBAT6U      (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
 
 #define CONFIG_SYS_IBAT7L      0
@@ -633,14 +661,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_SYS_DBAT7L      CONFIG_SYS_IBAT7L
 #define CONFIG_SYS_DBAT7U      CONFIG_SYS_IBAT7U
 
-/*
- * Internal Definitions
- *
- * Boot Flags
- */
-#define BOOTFLAG_COLD  0x01    /* Normal Power-On: Boot from FLASH */
-#define BOOTFLAG_WARM  0x02    /* Software reboot */
-
 #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 */
@@ -652,18 +672,6 @@ boards, we say we have two, but don't display a message if we find only one. */
  */
 #define CONFIG_ENV_OVERWRITE
 
-#ifdef CONFIG_HAS_ETH0
-#define CONFIG_ETHADDR         00:E0:0C:00:8C:01
-#endif
-
-#ifdef CONFIG_HAS_ETH1
-#define CONFIG_ETH1ADDR                00:E0:0C:00:8C:02
-#endif
-
-#define CONFIG_IPADDR          192.168.1.253
-#define CONFIG_SERVERIP                192.168.1.1
-#define CONFIG_GATEWAYIP       192.168.1.1
-#define CONFIG_NETMASK         255.255.252.0
 #define CONFIG_NETDEV          eth0
 
 #ifdef CONFIG_MPC8349ITX
@@ -673,8 +681,8 @@ boards, we say we have two, but don't display a message if we find only one. */
 #endif
 
 /* Default path and filenames */
-#define CONFIG_ROOTPATH                /nfsroot/rootfs
-#define CONFIG_BOOTFILE                uImage
+#define CONFIG_ROOTPATH                "/nfsroot/rootfs"
+#define CONFIG_BOOTFILE                "uImage"
 #define CONFIG_UBOOTPATH       u-boot.bin      /* U-Boot image on TFTP server */
 
 #ifdef CONFIG_MPC8349ITX
@@ -683,14 +691,14 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_FDTFILE         mpc8349emitxgp.dtb
 #endif
 
-#define CONFIG_BOOTDELAY       0
+#define CONFIG_BOOTDELAY       6
 
 #define XMK_STR(x)     #x
 #define MK_STR(x)      XMK_STR(x)
 
 #define CONFIG_BOOTARGS \
        "root=/dev/nfs rw" \
-       " nfsroot=" MK_STR(CONFIG_SERVERIP) ":" MK_STR(CONFIG_ROOTPATH) \
+       " nfsroot=" MK_STR(CONFIG_SERVERIP) ":" CONFIG_ROOTPATH         \
        " ip=" MK_STR(CONFIG_IPADDR) ":" MK_STR(CONFIG_SERVERIP) ":"    \
                MK_STR(CONFIG_GATEWAYIP) ":" MK_STR(CONFIG_NETMASK) ":" \
                MK_STR(CONFIG_HOSTNAME) ":" MK_STR(CONFIG_NETDEV) ":off" \
@@ -701,12 +709,12 @@ boards, we say we have two, but don't display a message if we find only one. */
        "netdev=" MK_STR(CONFIG_NETDEV) "\0"                            \
        "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0"                          \
        "tftpflash=tftpboot $loadaddr $uboot; "                         \
-               "protect off " MK_STR(TEXT_BASE) " +$filesize; "        \
-               "erase " MK_STR(TEXT_BASE) " +$filesize; "              \
-               "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; "      \
-               "protect on " MK_STR(TEXT_BASE) " +$filesize; "         \
-               "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0"     \
-       "fdtaddr=400000\0"                                              \
+               "protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "     \
+               "erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "           \
+               "cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; "   \
+               "protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; "              \
+               "cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0"  \
+       "fdtaddr=780000\0"                                              \
        "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0"
 
 #define CONFIG_NFSBOOTCOMMAND                                          \