summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-01 20:32:56 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-01 20:32:56 +0000
commitfabe00c6f20ed634ab9c108c85b546847ca24d1c (patch)
treefa27ba35f32fe14f05ddfdf383b3a9af1ccb1d0e /firmware
parent79011bae80ab000d513a36754a857b272cded593 (diff)
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/src/os/pio_irq.c12
1 files changed, 10 insertions, 2 deletions
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);
personal git repositories of Harald Welte. Your mileage may vary