]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx
authorWolfgang Denk <wd@denx.de>
Sat, 8 Mar 2008 09:55:46 +0000 (10:55 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 8 Mar 2008 09:55:46 +0000 (10:55 +0100)
board/amcc/taihu/taihu.c
board/mgcoge/mgcoge.c
board/mgsuvd/mgsuvd.c
include/configs/mgcoge.h
include/configs/mgsuvd.h
include/configs/sequoia.h

index ea83671988a3efd8250a9979015cb8be2810133e..eedde597b81cc1e7024b7f67314a7d39afa0ce66 100644 (file)
@@ -162,7 +162,7 @@ void spi_sda(int bit)
 
 unsigned char spi_read(void)
 {
-       return (unsigned char)gpio_read_out_bit(SPI_DIN_GPIO15);
+       return (unsigned char)gpio_read_in_bit(SPI_DIN_GPIO15);
 }
 
 void taihu_spi_chipsel(int cs)
index 0207a3aebd7adc76a6af255361d6418a361fe62c..e7c3fa00c761796a4ec601f0d83257a3e2d22b54 100644 (file)
@@ -278,6 +278,17 @@ int checkboard(void)
        return 0;
 }
 
+/*
+ * Early board initalization.
+ */
+int board_early_init_r(void)
+{
+       /* setup the UPIOx */
+       *(char *)(CFG_PIGGY_BASE + 0x02) = 0xc0;
+       *(char *)(CFG_PIGGY_BASE + 0x03) = 0x15;
+       return 0;
+}
+
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
 /*
  * update "memory" property in the blob
@@ -286,7 +297,7 @@ void ft_blob_update(void *blob, bd_t *bd)
 {
        int ret, nodeoffset = 0;
        ulong memory_data[2] = {0};
-       ulong flash_data[4] = {0};
+       ulong flash_data[8] = {0};
 
        memory_data[0] = cpu_to_be32(bd->bi_memstart);
        memory_data[1] = cpu_to_be32(bd->bi_memsize);
@@ -304,9 +315,13 @@ void ft_blob_update(void *blob, bd_t *bd)
                printf("ft_blob_update(): cannot find /memory node "
                "err:%s\n", fdt_strerror(nodeoffset));
        }
-       /* update Flash size */
-       flash_data[2] = cpu_to_be32(bd->bi_flashstart);
-       flash_data[3] = cpu_to_be32(bd->bi_flashsize);
+       /* update Flash addr, size */
+       flash_data[2] = cpu_to_be32(CFG_FLASH_BASE);
+       flash_data[3] = cpu_to_be32(CFG_FLASH_SIZE);
+       flash_data[4] = cpu_to_be32(1);
+       flash_data[5] = cpu_to_be32(0);
+       flash_data[6] = cpu_to_be32(CFG_FLASH_BASE_1);
+       flash_data[7] = cpu_to_be32(CFG_FLASH_SIZE_1);
        nodeoffset = fdt_path_offset (blob, "/localbus");
        if (nodeoffset >= 0) {
                ret = fdt_setprop(blob, nodeoffset, "ranges", flash_data,
@@ -331,7 +346,7 @@ void ft_blob_update(void *blob, bd_t *bd)
        }
        else {
                /* memory node is required in dts */
-               printf("ft_blob_update(): cannot find /localbus node "
+               printf("ft_blob_update(): cannot find /soc/cpm/ethernet node "
                "err:%s\n", fdt_strerror(nodeoffset));
        }
 
index 9fd164b96ecbf721c54bf3ef9ed0ecdf7bf4b97d..e0123bfa501b5bfddbd8265ae70a2134b314f7c2 100644 (file)
@@ -134,6 +134,17 @@ long int initdram (int board_type)
        return (size);
 }
 
+/*
+ * Early board initalization.
+ */
+int board_early_init_r(void)
+{
+       /* setup the UPIOx */
+       *(char *)(CFG_PIGGY_BASE + 0x02) = 0xc0;
+       *(char *)(CFG_PIGGY_BASE + 0x03) = 0x35;
+       return 0;
+}
+
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
 /*
  * update "memory" property in the blob
@@ -179,31 +190,31 @@ void ft_blob_update(void *blob, bd_t *bd)
        }
        /* BRG */
        brg_data[0] = cpu_to_be32(bd->bi_busfreq);
-       nodeoffset = fdt_path_offset (blob, "/soc866/cpm");
+       nodeoffset = fdt_path_offset (blob, "/soc/cpm");
        if (nodeoffset >= 0) {
                ret = fdt_setprop(blob, nodeoffset, "brg-frequency", brg_data,
                                        sizeof(brg_data));
        if (ret < 0)
-               printf("ft_blob_update): cannot set /soc866/cpm/brg-frequency "
+               printf("ft_blob_update): cannot set /soc/cpm/brg-frequency "
                        "property err:%s\n", fdt_strerror(ret));
        }
        else {
                /* memory node is required in dts */
-               printf("ft_blob_update(): cannot find /localbus node "
+               printf("ft_blob_update(): cannot find /soc/cpm node "
                "err:%s\n", fdt_strerror(nodeoffset));
        }
        /* MAC Adresse */
-       nodeoffset = fdt_path_offset (blob, "/soc866/cpm/ethernet");
+       nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
        if (nodeoffset >= 0) {
                ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr,
                                        sizeof(uchar) * 6);
        if (ret < 0)
-               printf("ft_blob_update): cannot set /soc866/cpm/scc/mac-address "
+               printf("ft_blob_update): cannot set /soc/cpm/scc/mac-address "
                        "property err:%s\n", fdt_strerror(ret));
        }
        else {
                /* memory node is required in dts */
-               printf("ft_blob_update(): cannot find /localbus node "
+               printf("ft_blob_update(): cannot find /soc/cpm/ethernet node "
                "err:%s\n", fdt_strerror(nodeoffset));
        }
 }
index f4a1cc0ecae3a7d04999a809e5fcacfd59e2b7a3..98facf23c5ff8f96e2e92531651a038daee6e3df 100644 (file)
@@ -35,6 +35,9 @@
 
 #define CONFIG_CPM2            1       /* Has a CPM2 */
 
+/* Do boardspecific init */
+#define CONFIG_BOARD_EARLY_INIT_R       1
+
 /*
  * Select serial console configuration
  *
 #define CFG_FLASH_SIZE         32
 #define CFG_FLASH_CFI
 #define CFG_FLASH_CFI_DRIVER
-#define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks       */
-#define CFG_MAX_FLASH_SECT     256     /* max num of sects on one chip */
+#define CFG_MAX_FLASH_BANKS    2       /* max num of flash banks       */
+#define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
+
+#define CFG_FLASH_BASE_1       0x50000000
+#define CFG_FLASH_SIZE_1       64
+
+#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE, CFG_FLASH_BASE_1 }
 
 #define CFG_MONITOR_BASE       TEXT_BASE
 #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  * ---- ---     ------- ------  ------
  *  0   60x     GPCM     8 bit  FLASH
  *  1   60x     SDRAM   32 bit  SDRAM
+ *  3   60x     GPCM     8 bit  GPIO/PIGGY
+ *  5   60x     GPCM    16 bit  CFG-Flash
  *
  */
 /* Bank 0 - FLASH
                         PSDMR_WRC_1C                   |\
                         PSDMR_CL_2)
 
+/* GPIO/PIGGY on CS3 initialization values
+*/
+#define CFG_PIGGY_BASE 0x30000000
+#define CFG_PIGGY_SIZE 128
+
+#define CFG_BR3_PRELIM ((CFG_PIGGY_BASE & BRx_BA_MSK) |\
+                        BRx_PS_8 | BRx_MS_GPCM_P | BRx_V)
+
+#define CFG_OR3_PRELIM (MEG_TO_AM(CFG_PIGGY_SIZE) |\
+                        ORxG_CSNT | ORxG_ACS_DIV2 |\
+                        ORxG_SCY_3_CLK | ORxG_TRLX )
+
+/* CFG-Flash on CS5 initialization values
+*/
+#define CFG_BR5_PRELIM ((CFG_FLASH_BASE_1 & BRx_BA_MSK) |\
+                        BRx_PS_16 | BRx_MS_GPCM_P | BRx_V)
+
+#define CFG_OR5_PRELIM (MEG_TO_AM(CFG_FLASH_SIZE_1) |\
+                        ORxG_CSNT | ORxG_ACS_DIV2 |\
+                        ORxG_SCY_5_CLK | ORxG_TRLX )
+
 #define        CFG_RESET_ADDRESS 0xFDFFFFFC    /* "bad" address                */
 
 /* pass open firmware flat tree */
index 81818723c5f07d587526738e684abfa0a72a2af3..5482089c93f90affc215e52888d13cbbdeaf9559 100644 (file)
@@ -36,6 +36,9 @@
 #define CONFIG_MPC866          1       /* This is a MPC866 CPU         */
 #define CONFIG_MGSUVD          1       /* ...on a mgsuvd board */
 
+/* Do boardspecific init */
+#define CONFIG_BOARD_EARLY_INIT_R       1
+
 #define CONFIG_8xx_GCLK_FREQ           66000000
 
 #define CFG_SMC_UCODE_PATCH    1       /* Relocate SMC1 */
  * 64  Refresh cycle in ms per number of rows
  */
 #define CFG_PTA_PER_CLK        ((4096 * 64 * 1000) / (4 * 64))
-/* HS HS noch zu setzen */
+
+/* GPIO/PIGGY on CS3 initialization values
+*/
+#define CFG_PIGGY_BASE (0x30000000)
+#define CFG_OR3_PRELIM (0xfe000d24)
+#define CFG_BR3_PRELIM (0x30000401)
 
 /*
  * Internal Definitions
 #define CONFIG_OF_BOARD_SETUP  1
 
 #define OF_CPU                 "PowerPC,866@0"
-#define OF_SOC                 "soc@f0000000"
+#define OF_SOC                 "soc@fff00000"
 #define OF_TBCLK               (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH         "/soc/cpm/serial@a80"
 
index cc910deb64f68815e1c8deb49fe3120fdcbb36e2..dfa8779bccc31c8f7118cb73c1dc55e4c2177ddd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2006-2007
+ * (C) Copyright 2006-2008
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
  * (C) Copyright 2006
 /* Setup some board specific values for the default environment variables */
 #ifndef CONFIG_RAINIER
 #define CONFIG_HOSTNAME                sequoia
-#define CFG_BOOTFILE           "bootfile=/tftpboot/sequoia/uImage\0"
+#define CFG_BOOTFILE           "bootfile=sequoia/uImage\0"
+#define CFG_DTBFILE            "fdt_file=sequoia/sequoia.dtb\0"
 #define CFG_ROOTPATH           "rootpath=/opt/eldk/ppc_4xxFP\0"
 #else
 #define CONFIG_HOSTNAME                rainier
-#define CFG_BOOTFILE           "bootfile=/tftpboot/rainier/uImage\0"
+#define CFG_BOOTFILE           "bootfile=rainier/uImage\0"
+#define CFG_DTBFILE            "fdt_file=rainier/rainier.dtb\0"
 #define CFG_ROOTPATH           "rootpath=/opt/eldk/ppc_4xx\0"
 #endif
 
                "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;"                           \
+       "addmisc=setenv bootargs ${bootargs} mem=${mem}\0"              \
+       "flash_nfs=run nfsargs addip addtty addmisc;"                   \
                "bootm ${kernel_addr}\0"                                \
-       "flash_self=run ramargs addip addtty;"                          \
+       "flash_self=run ramargs addip addtty addmisc;"                  \
                "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
-       "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;"     \
-               "bootm\0"                                               \
+       "net_nfs=tftp 200000 ${bootfile};"                              \
+               "run nfsargs addip addtty addmisc;"                     \
+               "bootm\0"                                               \
+       "fdt_file=sequoia/sequoia.dtb\0"                                \
+       "fdt_addr=400000\0"                                             \
+       "net_nfs_fdt=tftp 200000 ${bootfile};"                          \
+               "tftp ${fdt_addr} ${fdt_file};"                         \
+               "run nfsargs addip addtty addmisc;"                     \
+               "bootm 200000 - ${fdt_addr}\0"                          \
        "kernel_addr=FC000000\0"                                        \
        "ramdisk_addr=FC180000\0"                                       \
        "load=tftp 200000 /tftpboot/${hostname}/u-boot.bin\0"           \