From 25991353204c78b094c3c1fec90182dcd607ab8f Mon Sep 17 00:00:00 2001 From: Wolfgang Grandegger Date: Thu, 5 Jun 2008 13:12:06 +0200 Subject: 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 --- board/tqc/tqm85xx/tqm85xx.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'board/tqc/tqm85xx') 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 #include #include +#include +#include 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) { -- cgit v1.1