summaryrefslogtreecommitdiff
path: root/board/freescale/mpc8260ads
diff options
context:
space:
mode:
authorMatvejchikov Ilya <matvejchikov@gmail.com>2008-07-06 13:57:00 +0400
committerWolfgang Denk <wd@denx.de>2008-07-09 23:57:59 +0200
commit0e6989b9faf1588e8723535539e88a0df3c71356 (patch)
tree5489005650c4a74427e9947a6864119fbb60d5f0 /board/freescale/mpc8260ads
parentdc4b0b38d4aadf08826f6c31270f1eecd27964fd (diff)
downloadu-boot-imx-0e6989b9faf1588e8723535539e88a0df3c71356.zip
u-boot-imx-0e6989b9faf1588e8723535539e88a0df3c71356.tar.gz
u-boot-imx-0e6989b9faf1588e8723535539e88a0df3c71356.tar.bz2
FDT memory and pci node fixes for MPC8260ADS
Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Diffstat (limited to 'board/freescale/mpc8260ads')
-rw-r--r--board/freescale/mpc8260ads/mpc8260ads.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/board/freescale/mpc8260ads/mpc8260ads.c b/board/freescale/mpc8260ads/mpc8260ads.c
index 6f683f0..8ab7d35 100644
--- a/board/freescale/mpc8260ads/mpc8260ads.c
+++ b/board/freescale/mpc8260ads/mpc8260ads.c
@@ -46,6 +46,10 @@
#ifdef CONFIG_PCI
#include <pci.h>
#endif
+#ifdef CONFIG_OF_LIBFDT
+#include <libfdt.h>
+#include <fdt_support.h>
+#endif
/*
* I/O Port configuration table
@@ -544,3 +548,26 @@ void pci_init_board(void)
pci_mpc8250_init(&hose);
}
#endif
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_blob_update(void *blob, bd_t *bd)
+{
+ int ret;
+
+ ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
+
+ if (ret < 0) {
+ printf("ft_blob_update(): cannot set /memory/reg "
+ "property err:%s\n", fdt_strerror(ret));
+ }
+}
+
+void ft_board_setup(void *blob, bd_t *bd)
+{
+ ft_cpu_setup(blob, bd);
+#ifdef CONFIG_PCI
+ ft_pci_setup(blob, bd);
+#endif
+ ft_blob_update(blob, bd);
+}
+#endif