static int adm5120_intc_irq_set_type(unsigned int irq, unsigned int flow_type)
{
/* TODO: not yet tested */
-#if 1
+
unsigned int sense;
unsigned long mode;
int err = 0;
mode &= (1 << (irq-ADM5120_INTC_IRQ_BASE));
INTC_WRITE(INTC_REG_INT_MODE, mode);
- /* fallthrogh */
+ /* fallthrough */
default:
irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK;
irq_desc[irq].status |= sense;
break;
}
-#endif
+
return 0;
}
/* disable all interrupts */
INTC_WRITE(INTC_REG_IRQ_DISABLE, INTC_INT_ALL);
+
/* setup all interrupts to generate IRQ instead of FIQ */
INTC_WRITE(INTC_REG_INT_MODE, 0);
+
/* set active level for all external interrupts to HIGH */
INTC_WRITE(INTC_REG_INT_LEVEL, 0);
+
/* disable usage of the TEST_SOURCE register */
INTC_WRITE(INTC_REG_IRQ_SOURCE_SELECT, 0);