split irq handler in two parts to make it callable from FIQ

git-svn-id: https://svn.openpcd.org:2342/trunk@244 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
This commit is contained in:
laforge 2006-10-01 20:32:56 +00:00
parent 79011bae80
commit fabe00c6f2
1 changed files with 10 additions and 2 deletions

View File

@ -33,9 +33,10 @@ struct pioirq_state {
static struct pioirq_state pirqs;
static void pio_irq_demux(void)
/* low-level handler, used by Cstartup_app.S PIOA fast forcing and
* by regular interrupt handler below */
void __pio_irq_demux(u_int32_t pio)
{
u_int32_t pio = AT91F_PIO_GetInterruptStatus(AT91C_BASE_PIOA);
u_int8_t send_usb = 0;
int i;
@ -74,6 +75,13 @@ static void pio_irq_demux(void)
AT91F_AIC_ClearIt(AT91C_BASE_AIC, AT91C_ID_PIOA);
}
/* regular interrupt handler, in case fast forcing for PIOA disabled */
static void pio_irq_demux(void)
{
u_int32_t pio = AT91F_PIO_GetInterruptStatus(AT91C_BASE_PIOA);
__pio_irq_demux(pio);
}
void pio_irq_enable(u_int32_t pio)
{
AT91F_PIO_InterruptEnable(AT91C_BASE_PIOA, pio);