-static void rt305x_intc_irq_unmask(unsigned int irq)
-{
- irq -= RT305X_INTC_IRQ_BASE;
- rt305x_intc_wr((1 << irq), INTC_REG_ENABLE);
-}
-
-static void rt305x_intc_irq_mask(unsigned int irq)
-{
- irq -= RT305X_INTC_IRQ_BASE;
- rt305x_intc_wr((1 << irq), INTC_REG_DISABLE);
-}
-
-struct irq_chip rt305x_intc_irq_chip = {
- .name = "RT305X INTC",
- .unmask = rt305x_intc_irq_unmask,
- .mask = rt305x_intc_irq_mask,
- .mask_ack = rt305x_intc_irq_mask,
-};
-
-static struct irqaction rt305x_intc_irqaction = {
- .handler = no_action,
- .name = "cascade [RT305X INTC]",
-};
-
-static void __init rt305x_intc_irq_init(void)
-{
- int i;
-
- /* disable all interrupts */
- rt305x_intc_wr(~0, INTC_REG_DISABLE);
-
- /* route all INTC interrupts to MIPS HW0 interrupt */
- rt305x_intc_wr(0, INTC_REG_TYPE);
-
- for (i = RT305X_INTC_IRQ_BASE;
- i < RT305X_INTC_IRQ_BASE + RT305X_INTC_IRQ_COUNT; i++) {
- set_irq_chip_and_handler(i, &rt305x_intc_irq_chip,
- handle_level_irq);
- }
-
- setup_irq(RT305X_CPU_IRQ_INTC, &rt305x_intc_irqaction);
-
- /* enable interrupt masking */
- rt305x_intc_wr(RT305X_INTC_INT_GLOBAL, INTC_REG_ENABLE);
-}
-