diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-10-04 00:28:43 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-10-08 08:38:40 -0500 |
commit | c9438affcb7ac0dda4c6c6961637fb272f7c32d4 (patch) | |
tree | 7a7118672e012239d820623e86e3a5e23cb034d6 /arch/powerpc/platforms/85xx/mpc85xx_ds.c | |
parent | 2fce1225af6f2d3bb9ffb4e6253400db61278594 (diff) | |
download | kernel_goldelico_gta04-c9438affcb7ac0dda4c6c6961637fb272f7c32d4.zip kernel_goldelico_gta04-c9438affcb7ac0dda4c6c6961637fb272f7c32d4.tar.gz kernel_goldelico_gta04-c9438affcb7ac0dda4c6c6961637fb272f7c32d4.tar.bz2 |
[POWERPC] Use for_each_ matching routinues for pci PHBs
On the Freescale embedded (83xx, 85xx, 86xx) and a few of the discrete
bridges (mpc10x, tsi108) use the new for_each_compatible_node() or
for_each_node_by_type() to provide more exact matching when looking for
PHBs in the device tree.
With the previous code it was possible to match on pci bridges since
we were only matching on device_type.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/85xx/mpc85xx_ds.c')
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 4d44902..d60bb2b 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -149,14 +149,18 @@ static void __init mpc85xx_ds_setup_arch(void) ppc_md.progress("mpc85xx_ds_setup_arch()", 0); #ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) { - struct resource rsrc; - of_address_to_resource(np, 0, &rsrc); - if ((rsrc.start & 0xfffff) == primary_phb_addr) - fsl_add_bridge(np, 1); - else - fsl_add_bridge(np, 0); + for_each_node_by_type(np, "pci") { + if (of_device_is_compatible(np, "fsl,mpc8540-pci") || + of_device_is_compatible(np, "fsl,mpc8548-pcie")) { + struct resource rsrc; + of_address_to_resource(np, 0, &rsrc); + if ((rsrc.start & 0xfffff) == primary_phb_addr) + fsl_add_bridge(np, 1); + else + fsl_add_bridge(np, 0); + } } + uses_fsl_uli_m1575 = 1; ppc_md.pci_exclude_device = mpc85xx_exclude_device; #endif |