]> git.sur5r.net Git - u-boot/commitdiff
[Motion-PRO] Enable Flat Device Tree support and modify default environment
authorBartlomiej Sieka <tur@semihalf.com>
Tue, 8 May 2007 07:21:57 +0000 (09:21 +0200)
committerBartlomiej Sieka <tur@semihalf.com>
Tue, 8 May 2007 07:21:57 +0000 (09:21 +0200)
to allow booting of FDT-expecting kernels.

board/motionpro/motionpro.c
include/configs/motionpro.h

index 95576ed56b86b5fa467171177b89a78be7b9fc29..887aadeeed219870bb0cbfa2504bee5dc1e0d41e 100644 (file)
@@ -29,6 +29,9 @@
 #include <common.h>
 #include <mpc5xxx.h>
 
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+#endif
 
 /* Kollmorgen DPR initialization data */
 struct init_elem {
@@ -169,3 +172,11 @@ int checkboard (void)
        puts("Board: Promess Motion-PRO board\n");
        return 0;
 }
+
+
+#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+       ft_cpu_setup(blob, bd);
+}
+#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */
index 5328e8d6b1cebac97c073b6c9d1c93ee4391cd85..b1edde8b46e18b992f5abbe6c2e6286ffb68b74d 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-
 /*
  * High Level Configuration Options
  */
  * Default environment settings
  */
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
-       "sdram_test=0\0"                                                \
        "netdev=eth0\0"                                                 \
        "hostname=motionpro\0"                                          \
        "netmask=255.255.0.0\0"                                         \
        "ipaddr=192.168.160.22\0"                                       \
        "serverip=192.168.1.1\0"                                        \
        "gatewayip=192.168.1.1\0"                                       \
-       "kernel_addr=200000\0"                                          \
+       "console=ttyPSC0,115200\0"                                      \
        "u-boot_addr=100000\0"                                          \
-       "kernel_sector=20\0"                                            \
-       "kernel_size=1000\0"                                            \
-       "console=ttyS0,115200\0"                                        \
+       "kernel_addr=200000\0"                                          \
+       "fdt_addr=400000\0"                                             \
+       "ramdisk_addr=500000\0"                                         \
        "rootpath=/opt/eldk-4.1/ppc_6xx\0"                              \
-       "bootfile=/tftpboot/motionpro/uImage\0"                         \
        "u-boot=/tftpboot/motionpro/u-boot.bin\0"                       \
+       "bootfile=/tftpboot/motionpro/uImage\0"                         \
+       "fdt_file=/tftpboot/motionpro/motionpro.dtb\0"                  \
+       "ramdisk_file=/tftpboot/motionpro/uRamdisk\0"                   \
        "load=tftp $(u-boot_addr) $(u-boot)\0"                          \
        "update=prot off fff00000 fff3ffff; era fff00000 fff3ffff; "    \
                "cp.b $(u-boot_addr) fff00000 $(filesize);"             \
                "prot on fff00000 fff3ffff\0"                           \
        "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
-       "addip=setenv bootargs $(bootargs) console=$(console) "         \
-               "ip=$(ipaddr):$(serverip):$(gatewayip):"                \
-               "$(netmask):$(hostname):$(netdev):off panic=1\0"        \
-       "flash_nfs=run nfsargs addip;bootm $(kernel_addr)\0"            \
-       "flash_self=run ramargs addip;bootm $(kernel_addr) "            \
-               "$(ramdisk_addr)\0"                                     \
-       "net_nfs=tftp $(kernel_addr) $(bootfile); run nfsargs addip; "  \
-               "bootm $(kernel_addr)\0"                                \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=$(serverip):$(rootpath)\0"                     \
-       "fstype=ext3\0"                                                 \
-       "fatargs=setenv bootargs init=/linuxrc rw\0"                    \
+       "addip=setenv bootargs $(bootargs) "                            \
+               "ip=$(ipaddr):$(serverip):$(gatewayip):"                \
+               "$(netmask):$(hostname):$(netdev):off panic=1 "         \
+               "console=$(console)\0"                                  \
+       "net_nfs=tftp $(kernel_addr) $(bootfile); "                     \
+               "tftp $(fdt_addr) $(fdt_file); run nfsargs addip; "     \
+               "bootm $(kernel_addr) - $(fdt_addr)\0"                  \
+       "net_self=tftp $(kernel_addr) $(bootfile); "                    \
+               "tftp $(fdt_addr) $(fdt_file); "                        \
+               "tftp $(ramdisk_addr) $(ramdisk_file); "                \
+               "run ramargs addip; "                                   \
+               "bootm $(kernel_addr) $(ramdisk_addr) $(fdt_addr)\0"    \
        ""
 #define CONFIG_BOOTCOMMAND     "run net_nfs"
 
-
 /*
  * do board-specific init
  */
  */
 #define CFG_MPC5XXX_CLKIN      25000000
 
-
 /*
  * Memory map
  */
 /* Not needed for MPC 5xxx U-Boot, but used by tools/updater */
 #define CFG_RESET_ADDRESS      0xfff00100
 
+/* pass open firmware flat tree */
+#define CONFIG_OF_FLAT_TREE    1
+#define CONFIG_OF_BOARD_SETUP  1
+
+/* maximum size of the flat tree (8K) */
+#define OF_FLAT_TREE_MAX_SIZE  8192
+#define OF_CPU                 "PowerPC,5200@0"
+#define OF_SOC                 "soc5200@f0000000"
+#define OF_TBCLK               (bd->bi_busfreq / 4)
+#define OF_STDOUT_PAT          "/soc5200@f0000000/serial@2000"
+
 #endif /* __CONFIG_H */