From bede480d45f7257fa648b4c32a0549cfcca59b90 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Thu, 17 Nov 2011 18:48:48 +0400 Subject: powerpc/83xx: merge PCI bridge additions Nearly all mpc83xx-based boards have a common piece of code - one that loops over all pci/pcie bridges and registers them. Merge that code into a special function common to all boards. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Kumar Gala --- arch/powerpc/platforms/83xx/misc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/powerpc/platforms/83xx/misc.c') diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c index ee4de779ac11..125336f750c6 100644 --- a/arch/powerpc/platforms/83xx/misc.c +++ b/arch/powerpc/platforms/83xx/misc.c @@ -12,12 +12,14 @@ #include #include #include +#include #include #include #include #include #include +#include #include "mpc83xx.h" @@ -128,3 +130,15 @@ int __init mpc83xx_declare_of_platform_devices(void) of_platform_bus_probe(NULL, of_bus_ids, NULL); return 0; } + +#ifdef CONFIG_PCI +void __init mpc83xx_setup_pci(void) +{ + struct device_node *np; + + for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") + mpc83xx_add_bridge(np); + for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie") + mpc83xx_add_bridge(np); +} +#endif -- cgit