Change the configuration for the STx GP3-SSA board in order to support
 FDT parsing and passing.
Also changed default u-boot environment for convenience.

Signed-off-by: Bradley Hughes <bhug...@silicontkx.com>

---
 board/stx/stxssa/stxssa.c |   10 ++++
 include/configs/stxssa.h  |  114 +++++++++++++++++++++++++++++----------------
 2 files changed, 84 insertions(+), 40 deletions(-)

diff --git a/board/stx/stxssa/stxssa.c b/board/stx/stxssa/stxssa.c
index 0b2584c..9cd2c62 100644
--- a/board/stx/stxssa/stxssa.c
+++ b/board/stx/stxssa/stxssa.c
@@ -40,6 +40,8 @@
 #include <spd_sdram.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <libfdt.h>
+#include <fdt_support.h>

 long int fixed_sdram (void);

@@ -407,3 +409,11 @@ int board_eth_init(bd_t *bis)
        cpu_eth_init(bis);      /* Initialize TSECs first */
        return pci_eth_init(bis);
 }
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+        ft_cpu_setup(blob, bd);
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
+
diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h
index 363f7b4..d7adee9 100644
--- a/include/configs/stxssa.h
+++ b/include/configs/stxssa.h
@@ -26,11 +26,7 @@
  * MA 02111-1307 USA
  */

-/* mpc8560ads board configuration file */
-/* please refer to doc/README.mpc85xx for more info */
-/* make sure you change the MAC address and other network params first,
- * search for CONFIG_ETHADDR,CONFIG_SERVERIP,etc in this file
- */
+/* STX GP3 SSA board configuration file */

 #ifndef __CONFIG_H
 #define __CONFIG_H
@@ -41,7 +37,7 @@
 #define CONFIG_MPC85xx         1       /* MPC8540/MPC8560      */
 #define CONFIG_CPM2            1       /* has CPM2 */
 #define CONFIG_STXSSA          1       /* Silicon Tx GPPP SSA board specific*/
-#define CONFIG_MPC8560         1
+#define CONFIG_MPC8555         1

 #define CONFIG_PCI                     /* PCI ethernet support */
 #define CONFIG_TSEC_ENET               /* tsec ethernet support*/
@@ -194,6 +190,14 @@
 #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
 #endif

+/*
+ * Support FDT-file passing
+ */
+#define CONFIG_OF_LIBFDT                1
+#define CONFIG_OF_BOARD_SETUP           1
+#define CONFIG_OF_STDOUT_VIA_ALIAS      1
+
+
 /*
  * I2C
  */
@@ -346,15 +350,19 @@
  */
 #include <config_cmd_default.h>

+#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #define CONFIG_CMD_REGINFO

+#undef CONFIG_CMD_FUSE
+
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
 #endif
@@ -370,14 +378,13 @@
     #define CONFIG_CMD_ELF
 #endif

-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */

 /*
  * Miscellaneous configurable options
  */
 #define CONFIG_SYS_LONGHELP                    /* undef to save memory         
*/
-#define CONFIG_SYS_PROMPT      "SSA=> "        /* Monitor Command Prompt       
*/
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt       
*/
 #if defined(CONFIG_CMD_KGDB)
 #define CONFIG_SYS_CBSIZE      1024            /* Console I/O Buffer Size      
*/
 #else
@@ -419,6 +426,20 @@
 #define CONFIG_ETH2ADDR  00:e0:0c:07:9b:8c
 #endif

+
+
+/*
+ * Configuration options for EEPROM or FLASH Setup
+ */
+#define CONFIG_SERVERIP                10.10.0.150
+#define CONFIG_IPADDR          10.10.0.95
+#define CONFIG_GATEWAYIP       10.10.0.1
+#define CONFIG_NETMASK         255.255.255.0
+#define CONFIG_HOSTNAME                STX_SSA
+#define CONFIG_ROOTPATH                /opt/ppc/ppc_85xx
+#define CONFIG_BOOTFILE        stxssa/uImage
+#define CONFIG_FDTFILE         stxssa/stxssa.fdt
+
 /*
  * Environment in EEPROM is compatible with different flash sector sizes,
  * but only little space is available, so we use a very simple setup.
@@ -431,13 +452,6 @@
 #define CONFIG_BOOTDELAY       3       /* -1 disable autoboot */
 #define CONFIG_BOOTCOMMAND     "bootm 0xffc00000 0xffd00000"
 #define CONFIG_BOOTARGS                "root=/dev/nfs rw ip=any 
console=ttyS1,$baudrate"
-#define CONFIG_SERVERIP                192.168.85.1
-#define CONFIG_IPADDR          192.168.85.60
-#define CONFIG_GATEWAYIP       192.168.85.1
-#define CONFIG_NETMASK         255.255.255.0
-#define CONFIG_HOSTNAME                STX_SSA
-#define CONFIG_ROOTPATH                /gppproot
-#define CONFIG_BOOTFILE                uImage
 #define CONFIG_LOADADDR                0x1000000

 #else /* ENV IS IN FLASH               -- use a full-blown envionment */
@@ -452,31 +466,51 @@

 #undef CONFIG_BOOTARGS         /* the boot command will set bootargs   */

-#define        CONFIG_EXTRA_ENV_SETTINGS                                       
\
-       "hostname=gp3ssa\0"                                             \
-       "bootfile=/tftpboot/gp3ssa/uImage\0"                            \
-       "loadaddr=400000\0"                                             \
-       "netdev=eth0\0"                                                 \
-       "consdev=ttyS1\0"                                               \
-       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
-               "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"                      \
-       "addcons=setenv bootargs $bootargs "                            \
-               "console=$consdev,$baudrate\0"                          \
-       "flash_nfs=run nfsargs addip addcons;"                          \
-               "bootm $kernel_addr\0"                                  \
-       "flash_self=run ramargs addip addcons;"                         \
-               "bootm $kernel_addr $ramdisk_addr\0"                    \
-       "net_nfs=tftp $loadaddr $bootfile;"                             \
-               "run nfsargs addip addcons;bootm\0"                     \
-       "rootpath=/opt/eldk/ppc_85xx\0"                                 \
-       "kernel_addr=FC000000\0"                                        \
-       "ramdisk_addr=FC200000\0"                                       \
-       ""
-#define CONFIG_BOOTCOMMAND     "run flash_self"
+#define CONFIG_EXTRA_ENV_SETTINGS                                       \
+        "u-boot_addr_r=FFF00000\0"                                      \
+        "kernel_addr_r=FC000000\0"                                      \
+        "fdt_addr_r=FC400000\0"                                         \
+        "ramdisk_addr_r=FC200000\0"                                     \
+        "u-boot_addr=FFF00000\0"                                        \
+        "kernel_addr=FC000000\0"                                        \
+        "fdt_addr=FC400000\0"                                           \
+        "ramdisk_addr=FC200000\0"                                       \
+        "ramdiskfile=stxssa/uRamdisk\0"                                 \
+        "u-boot=stxssa/u-boot.bin\0"                                    \
+        "bootfile=stxssa/uImage\0"                                      \
+        "fdtfile=stxssa/stxssa.dtb\0"                                   \
+        "rootpath=/opt/ppc/ppc_85xx\n"                                  \
+        "netdev=eth0\0"                                                 \
+        "consdev=ttyPSC0\0"                                             \
+        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
+                "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=${consdev},${baudrate}\0"                      \
+        "flash_nfs=run nfsargs addip addtty;"                           \
+                "bootm ${kernel_addr} - ${fdt_addr}\0"                  \
+        "flash_self=run ramargs addip addtty;"                          \
+                "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0"    \
+        "net_nfs=tftp ${kernel_addr_r} ${bootfile};"                    \
+                "tftp ${fdt_addr_r} ${fdtfile};"                        \
+                "run nfsargs addip addtty;"                             \
+                "bootm ${kernel_addr_r} - ${fdt_addr_r}\0"              \
+        "net_self=tftp ${kernel_addr_r} ${bootfile};"                   \
+                "tftp ${ramdisk_addr_r} ${ramdiskfile};"                \
+                "tftp ${fdt_addr_r} ${fdtfile};"                        \
+                "run ramargs addip addtty;"                             \
+                "bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0"\
+        "load=tftp ${u-boot_addr_r} ${u-boot}\0"                        \
+        "update=protect off ${u-boot_addr} +${filesize};"               \
+                "era ${u-boot_addr} +${filesize};"                      \
+                "cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0"    \
+        "upd=run load update\0"                                         \
+        ""
+
+#define CONFIG_BOOTCOMMAND     "run net_nfs"

 #endif /* CONFIG_ENV_IS_IN_EEPROM */

-- 
1.7.0.4
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to