summaryrefslogtreecommitdiffstats
path: root/board/cds/mpc8555cds/mpc8555cds.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-11-29 00:11:44 -0600
committerKumar Gala <galak@kernel.crashing.org>2007-12-11 22:34:19 -0600
commitb90d25497625b90ffa3f2911a0895ca237556ff5 (patch)
tree7c3ff65ccfcf1992418261a669d6d8c9ad724be6 /board/cds/mpc8555cds/mpc8555cds.c
parent0fd5ec66b10521a057ad73e69ab5f0f9eafba255 (diff)
downloadtalos-obmc-uboot-b90d25497625b90ffa3f2911a0895ca237556ff5.tar.gz
talos-obmc-uboot-b90d25497625b90ffa3f2911a0895ca237556ff5.zip
Update MPC85xx CDS to use libfdt
Updated the MPC85xx CDS config to use libfdt and assume use of aliases for ethernet, pci, and serial for the various fixups that are done. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board/cds/mpc8555cds/mpc8555cds.c')
-rw-r--r--board/cds/mpc8555cds/mpc8555cds.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/board/cds/mpc8555cds/mpc8555cds.c b/board/cds/mpc8555cds/mpc8555cds.c
index 2f1b00e1ab..3ed10052c7 100644
--- a/board/cds/mpc8555cds/mpc8555cds.c
+++ b/board/cds/mpc8555cds/mpc8555cds.c
@@ -26,6 +26,8 @@
#include <asm/immap_85xx.h>
#include <ioports.h>
#include <spd.h>
+#include <libfdt.h>
+#include <fdt_support.h>
#include "../common/cadmus.h"
#include "../common/eeprom.h"
@@ -504,3 +506,31 @@ pci_init_board(void)
pci_mpc85xx_init(hose);
#endif
}
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_pci_setup(void *blob, bd_t *bd)
+{
+ int node, tmp[2];
+ const char *path;
+
+ node = fdt_path_offset(blob, "/aliases");
+ tmp[0] = 0;
+ if (node >= 0) {
+#ifdef CONFIG_PCI1
+ path = fdt_getprop(blob, node, "pci0", NULL);
+ if (path) {
+ tmp[1] = hose[0].last_busno - hose[0].first_busno;
+ do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1);
+ }
+#endif
+#ifdef CONFIG_MPC85XX_PCI2
+ path = fdt_getprop(blob, node, "pci1", NULL);
+ if (path) {
+ tmp[1] = hose[1].last_busno - hose[1].first_busno;
+ do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1);
+ }
+#endif
+ }
+}
+#endif
OpenPOWER on IntegriCloud