1 /* Author: Domen Puncer <domen@cba.si>. License: WTFPL, see file LICENSE */
5 // myeah, should be in arch for NVIC
6 #include <mach/lpc21xx_regs.h>
12 /* this will be changed to doubly linked list, and irq_request will also have to be fixed */
13 irqreturn_t (*handler
)(int irq
, void *dev_id
);
17 int irq_request(unsigned int irq
, irqreturn_t (*handler
)(int irq
, void *dev_id
), unsigned long flags
, void *dev_id
);
18 void irq_free(unsigned int irq
, void *dev_id
);
20 void irq_enable(int irq
)
22 VICIntSelect
&= ~(1<<irq
);
23 VICIntEnable
|= 1<<irq
;
26 void irq_disable(int irq
)
28 VICIntEnClr
|= 1<<irq
;
33 VICVectAddr
= 0; /* clear interrupt pending (of current executing interrupt) */
38 static irqreturn_t
irq_default_handler(int irq
, void *dev_id
)
40 printf("%s: unhandled irq %i, disabling\n", __func__
, irq
);