aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/uic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/uic.c')
-rw-r--r--arch/powerpc/sysdev/uic.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index ae3eadddddbd..625b275c3795 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -309,28 +309,23 @@ void __init uic_init_tree(void)
309 const u32 *interrupts; 309 const u32 *interrupts;
310 310
311 /* First locate and initialize the top-level UIC */ 311 /* First locate and initialize the top-level UIC */
312 312 for_each_compatible_node(np, NULL, "ibm,uic") {
313 np = of_find_compatible_node(NULL, NULL, "ibm,uic");
314 while (np) {
315 interrupts = of_get_property(np, "interrupts", NULL); 313 interrupts = of_get_property(np, "interrupts", NULL);
316 if (! interrupts) 314 if (!interrupts)
317 break; 315 break;
318
319 np = of_find_compatible_node(np, NULL, "ibm,uic");
320 } 316 }
321 317
322 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the 318 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the
323 * top-level interrupt controller */ 319 * top-level interrupt controller */
324 primary_uic = uic_init_one(np); 320 primary_uic = uic_init_one(np);
325 if (! primary_uic) 321 if (!primary_uic)
326 panic("Unable to initialize primary UIC %s\n", np->full_name); 322 panic("Unable to initialize primary UIC %s\n", np->full_name);
327 323
328 irq_set_default_host(primary_uic->irqhost); 324 irq_set_default_host(primary_uic->irqhost);
329 of_node_put(np); 325 of_node_put(np);
330 326
331 /* The scan again for cascaded UICs */ 327 /* The scan again for cascaded UICs */
332 np = of_find_compatible_node(NULL, NULL, "ibm,uic"); 328 for_each_compatible_node(np, NULL, "ibm,uic") {
333 while (np) {
334 interrupts = of_get_property(np, "interrupts", NULL); 329 interrupts = of_get_property(np, "interrupts", NULL);
335 if (interrupts) { 330 if (interrupts) {
336 /* Secondary UIC */ 331 /* Secondary UIC */
@@ -348,8 +343,6 @@ void __init uic_init_tree(void)
348 343
349 /* FIXME: setup critical cascade?? */ 344 /* FIXME: setup critical cascade?? */
350 } 345 }
351
352 np = of_find_compatible_node(np, NULL, "ibm,uic");
353 } 346 }
354} 347}
355 348