diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-04-27 22:01:25 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-04-27 22:01:25 +0000 |
commit | 39ed7087b344eaed04bae81e12e2bb3cd4264787 (patch) | |
tree | 79e8befe70f2327f4a78833581f8905d0c8cb467 /firmware/target/arm | |
parent | 88451d59c41251794b59dc31d9dfaa1c7e1881eb (diff) | |
download | rockbox-39ed7087b344eaed04bae81e12e2bb3cd4264787.tar.gz rockbox-39ed7087b344eaed04bae81e12e2bb3cd4264787.zip |
IMX31: Try to catch the interrupt that was the reason irq_handler was called since it never should be. The bootloader occasionally shows one but it's not saying what.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17271 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/avic-imx31.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c b/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c index ce2932a13f..9205c2e442 100644 --- a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c | |||
@@ -46,7 +46,7 @@ static const char * avic_int_names[64] = | |||
46 | void UIE_VECTOR(void) | 46 | void UIE_VECTOR(void) |
47 | { | 47 | { |
48 | int mode; | 48 | int mode; |
49 | long offset; | 49 | int offset; |
50 | 50 | ||
51 | asm volatile ( | 51 | asm volatile ( |
52 | "mrs %0, cpsr \n" /* Mask core IRQ/FIQ */ | 52 | "mrs %0, cpsr \n" /* Mask core IRQ/FIQ */ |
@@ -56,9 +56,10 @@ void UIE_VECTOR(void) | |||
56 | : "=&r"(mode) | 56 | : "=&r"(mode) |
57 | ); | 57 | ); |
58 | 58 | ||
59 | offset = mode == 0x11 ? (long)FIVECSR : ((long)NIVECSR >> 16); | 59 | offset = mode == 0x11 ? |
60 | (int32_t)FIVECSR : ((int32_t)NIVECSR >> 16); | ||
60 | 61 | ||
61 | panicf("Unhandled %s %ld: %s", | 62 | panicf("Unhandled %s %d: %s", |
62 | mode == 0x11 ? "FIQ" : "IRQ", offset, | 63 | mode == 0x11 ? "FIQ" : "IRQ", offset, |
63 | offset >= 0 ? avic_int_names[offset] : "<Unknown>"); | 64 | offset >= 0 ? avic_int_names[offset] : "<Unknown>"); |
64 | } | 65 | } |
@@ -66,7 +67,10 @@ void UIE_VECTOR(void) | |||
66 | /* We use the AVIC */ | 67 | /* We use the AVIC */ |
67 | void __attribute__((naked)) irq_handler(void) | 68 | void __attribute__((naked)) irq_handler(void) |
68 | { | 69 | { |
69 | panicf("Unhandled IRQ in irq_handler"); | 70 | const int offset = (int32_t)NIVECSR >> 16; |
71 | disable_interrupt(IRQ_FIQ_STATUS); | ||
72 | panicf("Unhandled IRQ %d in irq_handler: %s", offset, | ||
73 | offset >= 0 ? avic_int_names[offset] : "<Unknown>"); | ||
70 | } | 74 | } |
71 | 75 | ||
72 | /* Accoring to section 9.3.5 of the UM, the AVIC doesn't accelerate | 76 | /* Accoring to section 9.3.5 of the UM, the AVIC doesn't accelerate |