aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r--arch/powerpc/platforms/pseries/setup.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index bef4f683285..eb079521fbf 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -124,28 +124,32 @@ void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
124 desc->chip->eoi(irq); 124 desc->chip->eoi(irq);
125} 125}
126 126
127static void __init xics_setup_8259_cascade(void) 127static void __init pseries_setup_i8259_cascade(void)
128{ 128{
129 struct device_node *np, *old, *found = NULL; 129 struct device_node *np, *old, *found = NULL;
130 int cascade, naddr; 130 unsigned int cascade;
131 const u32 *addrp; 131 const u32 *addrp;
132 unsigned long intack = 0; 132 unsigned long intack = 0;
133 int naddr;
133 134
134 for_each_node_by_type(np, "interrupt-controller") 135 for_each_node_by_type(np, "interrupt-controller") {
135 if (of_device_is_compatible(np, "chrp,iic")) { 136 if (of_device_is_compatible(np, "chrp,iic")) {
136 found = np; 137 found = np;
137 break; 138 break;
138 } 139 }
140 }
141
139 if (found == NULL) { 142 if (found == NULL) {
140 printk(KERN_DEBUG "xics: no ISA interrupt controller\n"); 143 printk(KERN_DEBUG "pic: no ISA interrupt controller\n");
141 return; 144 return;
142 } 145 }
146
143 cascade = irq_of_parse_and_map(found, 0); 147 cascade = irq_of_parse_and_map(found, 0);
144 if (cascade == NO_IRQ) { 148 if (cascade == NO_IRQ) {
145 printk(KERN_ERR "xics: failed to map cascade interrupt"); 149 printk(KERN_ERR "pic: failed to map cascade interrupt");
146 return; 150 return;
147 } 151 }
148 pr_debug("xics: cascade mapped to irq %d\n", cascade); 152 pr_debug("pic: cascade mapped to irq %d\n", cascade);
149 153
150 for (old = of_node_get(found); old != NULL ; old = np) { 154 for (old = of_node_get(found); old != NULL ; old = np) {
151 np = of_get_parent(old); 155 np = of_get_parent(old);
@@ -163,7 +167,7 @@ static void __init xics_setup_8259_cascade(void)
163 intack |= ((unsigned long)addrp[naddr-2]) << 32; 167 intack |= ((unsigned long)addrp[naddr-2]) << 32;
164 } 168 }
165 if (intack) 169 if (intack)
166 printk(KERN_DEBUG "xics: PCI 8259 intack at 0x%016lx\n", intack); 170 printk(KERN_DEBUG "pic: PCI 8259 intack at 0x%016lx\n", intack);
167 i8259_init(found, intack); 171 i8259_init(found, intack);
168 of_node_put(found); 172 of_node_put(found);
169 set_irq_chained_handler(cascade, pseries_8259_cascade); 173 set_irq_chained_handler(cascade, pseries_8259_cascade);
@@ -251,7 +255,7 @@ static void __init pseries_mpic_init_IRQ(void)
251static void __init pseries_xics_init_IRQ(void) 255static void __init pseries_xics_init_IRQ(void)
252{ 256{
253 xics_init_IRQ(); 257 xics_init_IRQ();
254 xics_setup_8259_cascade(); 258 pseries_setup_i8259_cascade();
255} 259}
256 260
257static void pseries_lpar_enable_pmcs(void) 261static void pseries_lpar_enable_pmcs(void)