aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/83xx/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/83xx/misc.c')
-rw-r--r--arch/powerpc/platforms/83xx/misc.c77
1 files changed, 77 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index f01806c940e1..125336f750c6 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -11,10 +11,15 @@
11 11
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>
15#include <linux/pci.h>
14 16
15#include <asm/io.h> 17#include <asm/io.h>
16#include <asm/hw_irq.h> 18#include <asm/hw_irq.h>
19#include <asm/ipic.h>
20#include <asm/qe_ic.h>
17#include <sysdev/fsl_soc.h> 21#include <sysdev/fsl_soc.h>
22#include <sysdev/fsl_pci.h>
18 23
19#include "mpc83xx.h" 24#include "mpc83xx.h"
20 25
@@ -65,3 +70,75 @@ long __init mpc83xx_time_init(void)
65 70
66 return 0; 71 return 0;
67} 72}
73
74void __init mpc83xx_ipic_init_IRQ(void)
75{
76 struct device_node *np;
77
78 /* looking for fsl,pq2pro-pic which is asl compatible with fsl,ipic */
79 np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
80 if (!np)
81 np = of_find_node_by_type(NULL, "ipic");
82 if (!np)
83 return;
84
85 ipic_init(np, 0);
86
87 of_node_put(np);
88
89 /* Initialize the default interrupt mapping priorities,
90 * in case the boot rom changed something on us.
91 */
92 ipic_set_default_priority();
93}
94
95#ifdef CONFIG_QUICC_ENGINE
96void __init mpc83xx_qe_init_IRQ(void)
97{
98 struct device_node *np;
99
100 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
101 if (!np) {
102 np = of_find_node_by_type(NULL, "qeic");
103 if (!np)
104 return;
105 }
106 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
107 of_node_put(np);
108}
109
110void __init mpc83xx_ipic_and_qe_init_IRQ(void)
111{
112 mpc83xx_ipic_init_IRQ();
113 mpc83xx_qe_init_IRQ();
114}
115#endif /* CONFIG_QUICC_ENGINE */
116
117static struct of_device_id __initdata of_bus_ids[] = {
118 { .type = "soc", },
119 { .compatible = "soc", },
120 { .compatible = "simple-bus" },
121 { .compatible = "gianfar" },
122 { .compatible = "gpio-leds", },
123 { .type = "qe", },
124 { .compatible = "fsl,qe", },
125 {},
126};
127
128int __init mpc83xx_declare_of_platform_devices(void)
129{
130 of_platform_bus_probe(NULL, of_bus_ids, NULL);
131 return 0;
132}
133
134#ifdef CONFIG_PCI
135void __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