summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/avic-imx31.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/avic-imx31.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c b/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c
index ba7ed3314c..a135889e6e 100644
--- a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c
@@ -67,9 +67,20 @@ void UIE_VECTOR(void)
67} 67}
68 68
69/* We use the AVIC */ 69/* We use the AVIC */
70void __attribute__((naked)) irq_handler(void) 70void __attribute__((interrupt("IRQ"))) irq_handler(void)
71{ 71{
72 const int offset = (int32_t)NIVECSR >> 16; 72 const int offset = (int32_t)NIVECSR >> 16;
73
74 if (offset == -1)
75 {
76 /* This is called occasionally for some unknown reason even with the
77 * avic enabled but returning normally appears to cause no harm. The
78 * KPP and ATA seem to have a part in it (common but multiplexed pins
79 * that can interfere). It will be investigated more thoroughly but
80 * for now it is simply an occasional irritant. */
81 return;
82 }
83
73 disable_interrupt(IRQ_FIQ_STATUS); 84 disable_interrupt(IRQ_FIQ_STATUS);
74 panicf("Unhandled IRQ %d in irq_handler: %s", offset, 85 panicf("Unhandled IRQ %d in irq_handler: %s", offset,
75 offset >= 0 ? avic_int_names[offset] : "<Unknown>"); 86 offset >= 0 ? avic_int_names[offset] : "<Unknown>");