diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-11-17 09:48:48 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-11-24 03:01:40 -0500 |
commit | bede480d45f7257fa648b4c32a0549cfcca59b90 (patch) | |
tree | 54153884a9cf0d53f3b1ea556f39f6f8b97df92f /arch/powerpc/platforms/83xx/misc.c | |
parent | 7669d58c661b51f3c2b6bf0e93f230f0f7c2f597 (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.c | 14 |
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 @@ | |||
12 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
15 | #include <linux/pci.h> | ||
15 | 16 | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | #include <asm/hw_irq.h> | 18 | #include <asm/hw_irq.h> |
18 | #include <asm/ipic.h> | 19 | #include <asm/ipic.h> |
19 | #include <asm/qe_ic.h> | 20 | #include <asm/qe_ic.h> |
20 | #include <sysdev/fsl_soc.h> | 21 | #include <sysdev/fsl_soc.h> |
22 | #include <sysdev/fsl_pci.h> | ||
21 | 23 | ||
22 | #include "mpc83xx.h" | 24 | #include "mpc83xx.h" |
23 | 25 | ||
@@ -128,3 +130,15 @@ int __init mpc83xx_declare_of_platform_devices(void) | |||
128 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | 130 | of_platform_bus_probe(NULL, of_bus_ids, NULL); |
129 | return 0; | 131 | return 0; |
130 | } | 132 | } |
133 | |||
134 | #ifdef CONFIG_PCI | ||
135 | void __init mpc83xx_setup_pci(void) | ||
136 | { | ||
137 | struct device_node *np; | ||
138 | |||
139 | for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") | ||
140 | mpc83xx_add_bridge(np); | ||
141 | for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie") | ||
142 | mpc83xx_add_bridge(np); | ||
143 | } | ||
144 | #endif | ||