summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartlomiej Sieka <tur@semihalf.com>2007-05-08 09:21:57 +0200
committerBartlomiej Sieka <tur@semihalf.com>2007-05-08 09:21:57 +0200
commit1f1369c34b629be94702684d41d3fddf0f6193e7 (patch)
treebf5b478f76960d37abfddf1fd9e6111198c977d5
parent008861a2f3ef2c062744d733787c7e530a1b8761 (diff)
downloadu-boot-imx-1f1369c34b629be94702684d41d3fddf0f6193e7.zip
u-boot-imx-1f1369c34b629be94702684d41d3fddf0f6193e7.tar.gz
u-boot-imx-1f1369c34b629be94702684d41d3fddf0f6193e7.tar.bz2
[Motion-PRO] Enable Flat Device Tree support and modify default environment
to allow booting of FDT-expecting kernels.
-rw-r--r--board/motionpro/motionpro.c11
-rw-r--r--include/configs/motionpro.h49
2 files changed, 41 insertions, 19 deletions
diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c
index 95576ed..887aade 100644
--- a/board/motionpro/motionpro.c
+++ b/board/motionpro/motionpro.c
@@ -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) */
diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h
index 5328e8d..b1edde8 100644
--- a/include/configs/motionpro.h
+++ b/include/configs/motionpro.h
@@ -26,7 +26,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-
/*
* High Level Configuration Options
*/
@@ -94,42 +93,44 @@
* 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
*/
@@ -146,7 +147,6 @@
*/
#define CFG_MPC5XXX_CLKIN 25000000
-
/*
* Memory map
*/
@@ -302,4 +302,15 @@
/* 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 */