From fabe00c6f20ed634ab9c108c85b546847ca24d1c Mon Sep 17 00:00:00 2001 From: laforge Date: Sun, 1 Oct 2006 20:32:56 +0000 Subject: 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 --- firmware/src/os/pio_irq.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'firmware/src/os') diff --git a/firmware/src/os/pio_irq.c b/firmware/src/os/pio_irq.c index 14f51c2..4e94350 100644 --- a/firmware/src/os/pio_irq.c +++ b/firmware/src/os/pio_irq.c @@ -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); -- cgit v1.2.3