summaryrefslogtreecommitdiff
path: root/board/tqc/tqm85xx
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2008-06-05 13:12:06 +0200
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-06-11 00:00:45 -0500
commit25991353204c78b094c3c1fec90182dcd607ab8f (patch)
tree29b255e81d11c50f540e0d588a0a8d6780b125e3 /board/tqc/tqm85xx
parentd9ee843d54c54776e1fdb86336ce554906a87331 (diff)
downloadu-boot-imx-25991353204c78b094c3c1fec90182dcd607ab8f.zip
u-boot-imx-25991353204c78b094c3c1fec90182dcd607ab8f.tar.gz
u-boot-imx-25991353204c78b094c3c1fec90182dcd607ab8f.tar.bz2
TQM85xx: Support for Flat Device Tree
This patch adds support for Linux kernels using the Flat Device Tree. It also re-defines the default environment settings for booting Linux with the FDT blob. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Diffstat (limited to 'board/tqc/tqm85xx')
-rw-r--r--board/tqc/tqm85xx/tqm85xx.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c
index 4fb9c11..17df3bb 100644
--- a/board/tqc/tqm85xx/tqm85xx.c
+++ b/board/tqc/tqm85xx/tqm85xx.c
@@ -34,6 +34,8 @@
#include <asm/io.h>
#include <ioports.h>
#include <flash.h>
+#include <libfdt.h>
+#include <fdt_support.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -479,6 +481,28 @@ void pci_init_board (void)
#endif /* CONFIG_PCI */
}
+#if defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup (void *blob, bd_t *bd)
+{
+ int node, tmp[2];
+ const char *path;
+
+ ft_cpu_setup (blob, bd);
+
+ node = fdt_path_offset (blob, "/aliases");
+ tmp[0] = 0;
+ if (node >= 0) {
+#ifdef CONFIG_PCI
+ path = fdt_getprop (blob, node, "pci0", NULL);
+ if (path) {
+ tmp[1] = hose.last_busno - hose.first_busno;
+ do_fixup_by_path (blob, path, "bus-range", &tmp, 8, 1);
+ }
+#endif
+ }
+}
+#endif
+
#ifdef CONFIG_BOARD_EARLY_INIT_R
int board_early_init_r (void)
{