diff options
Diffstat (limited to 'arch/arm/mach-lpc32xx/irq.c')
-rw-r--r-- | arch/arm/mach-lpc32xx/irq.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index 3c6332753358..9ecb8f9c4ef5 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -412,7 +412,6 @@ static const struct of_device_id mic_of_match[] __initconst = { | |||
412 | void __init lpc32xx_init_irq(void) | 412 | void __init lpc32xx_init_irq(void) |
413 | { | 413 | { |
414 | unsigned int i; | 414 | unsigned int i; |
415 | int irq_base; | ||
416 | 415 | ||
417 | /* Setup MIC */ | 416 | /* Setup MIC */ |
418 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | 417 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); |
@@ -443,15 +442,6 @@ void __init lpc32xx_init_irq(void) | |||
443 | lpc32xx_set_default_mappings(SIC1_APR_DEFAULT, SIC1_ATR_DEFAULT, 32); | 442 | lpc32xx_set_default_mappings(SIC1_APR_DEFAULT, SIC1_ATR_DEFAULT, 32); |
444 | lpc32xx_set_default_mappings(SIC2_APR_DEFAULT, SIC2_ATR_DEFAULT, 64); | 443 | lpc32xx_set_default_mappings(SIC2_APR_DEFAULT, SIC2_ATR_DEFAULT, 64); |
445 | 444 | ||
446 | /* mask all interrupts except SUBIRQ */ | ||
447 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_MIC_BASE)); | ||
448 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); | ||
449 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); | ||
450 | |||
451 | /* MIC SUBIRQx interrupts will route handling to the chain handlers */ | ||
452 | irq_set_chained_handler(IRQ_LPC32XX_SUB1IRQ, lpc32xx_sic1_handler); | ||
453 | irq_set_chained_handler(IRQ_LPC32XX_SUB2IRQ, lpc32xx_sic2_handler); | ||
454 | |||
455 | /* Initially disable all wake events */ | 445 | /* Initially disable all wake events */ |
456 | __raw_writel(0, LPC32XX_CLKPWR_P01_ER); | 446 | __raw_writel(0, LPC32XX_CLKPWR_P01_ER); |
457 | __raw_writel(0, LPC32XX_CLKPWR_INT_ER); | 447 | __raw_writel(0, LPC32XX_CLKPWR_INT_ER); |
@@ -475,16 +465,13 @@ void __init lpc32xx_init_irq(void) | |||
475 | 465 | ||
476 | of_irq_init(mic_of_match); | 466 | of_irq_init(mic_of_match); |
477 | 467 | ||
478 | irq_base = irq_alloc_descs(-1, 0, NR_IRQS, 0); | ||
479 | if (irq_base < 0) { | ||
480 | pr_warn("Cannot allocate irq_descs, assuming pre-allocated\n"); | ||
481 | irq_base = 0; | ||
482 | } | ||
483 | |||
484 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, | 468 | lpc32xx_mic_domain = irq_domain_add_legacy(lpc32xx_mic_np, NR_IRQS, |
485 | irq_base, 0, | 469 | 0, 0, &irq_domain_simple_ops, |
486 | &irq_domain_simple_ops, | ||
487 | NULL); | 470 | NULL); |
488 | if (!lpc32xx_mic_domain) | 471 | if (!lpc32xx_mic_domain) |
489 | panic("Unable to add MIC irq domain\n"); | 472 | panic("Unable to add MIC irq domain\n"); |
473 | |||
474 | /* MIC SUBIRQx interrupts will route handling to the chain handlers */ | ||
475 | irq_set_chained_handler(IRQ_LPC32XX_SUB1IRQ, lpc32xx_sic1_handler); | ||
476 | irq_set_chained_handler(IRQ_LPC32XX_SUB2IRQ, lpc32xx_sic2_handler); | ||
490 | } | 477 | } |