summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/83xx/misc.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-11-17 18:48:48 +0400
committerKumar Gala <galak@kernel.crashing.org>2011-11-24 02:01:40 -0600
commitbede480d45f7257fa648b4c32a0549cfcca59b90 (patch)
tree54153884a9cf0d53f3b1ea556f39f6f8b97df92f /arch/powerpc/platforms/83xx/misc.c
parent7669d58c661b51f3c2b6bf0e93f230f0f7c2f597 (diff)
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 <dbaryshkov@gmail.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/83xx/misc.c')
-rw-r--r--arch/powerpc/platforms/83xx/misc.c14
1 files changed, 14 insertions, 0 deletions
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 <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/of_platform.h>
+#include <linux/pci.h>
#include <asm/io.h>
#include <asm/hw_irq.h>
#include <asm/ipic.h>
#include <asm/qe_ic.h>
#include <sysdev/fsl_soc.h>
+#include <sysdev/fsl_pci.h>
#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