diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2008-11-02 17:11:33 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2008-11-02 17:11:33 +0000 |
commit | aa061bc19285b2311d2fbec0b311c55cd6fb70d3 (patch) | |
tree | fd1eebd1a379b7dde379c660e7ad21e38cc92ab3 /firmware/target/arm/as3525/system-as3525.c | |
parent | 99d39f5c3a4ffb89d849e2f425b903ccc5751d31 (diff) | |
download | rockbox-aa061bc19285b2311d2fbec0b311c55cd6fb70d3.tar.gz rockbox-aa061bc19285b2311d2fbec0b311c55cd6fb70d3.zip |
AS3525 : fix interrupts support (but leave them disabled)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18979 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/system-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index a28ffc473e..9944e60cc5 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -87,10 +87,12 @@ static const char * const irqname[] = | |||
87 | 87 | ||
88 | static void UIRQ(void) | 88 | static void UIRQ(void) |
89 | { | 89 | { |
90 | /* TODO | 90 | unsigned int irq_no = 0; |
91 | unsigned int offset = INTOFFSET; | 91 | int status = VIC_IRQ_STATUS; |
92 | panicf("Unhandled IRQ %02X: %s", offset, irqname[offset]); | 92 | while((status >>= 1)) |
93 | */ | 93 | irq_no++; |
94 | |||
95 | panicf("Unhandled IRQ %02X: %s", irq_no, irqname[irq_no]); | ||
94 | } | 96 | } |
95 | 97 | ||
96 | void irq_handler(void) | 98 | void irq_handler(void) |
@@ -102,16 +104,12 @@ void irq_handler(void) | |||
102 | asm volatile( "stmfd sp!, {r0-r7, ip, lr} \n" /* Store context */ | 104 | asm volatile( "stmfd sp!, {r0-r7, ip, lr} \n" /* Store context */ |
103 | "sub sp, sp, #8 \n"); /* Reserve stack */ | 105 | "sub sp, sp, #8 \n"); /* Reserve stack */ |
104 | 106 | ||
105 | /* TODO */ | 107 | unsigned int irq_no = 0; |
106 | #if 0 | 108 | int status = VIC_IRQ_STATUS; |
107 | int irq_no = INTOFFSET; /* Read clears the corresponding IRQ status */ | 109 | while((status >>= 1)) |
108 | #else | 110 | irq_no++; |
109 | int irq_no = 69; | 111 | |
110 | #endif | 112 | irqvector[irq_no](); |
111 | if ((irq_no & (1<<31)) == 0) /* Ensure invalid flag is not set */ | ||
112 | { | ||
113 | irqvector[irq_no](); | ||
114 | } | ||
115 | 113 | ||
116 | asm volatile( "add sp, sp, #8 \n" /* Cleanup stack */ | 114 | asm volatile( "add sp, sp, #8 \n" /* Cleanup stack */ |
117 | "ldmfd sp!, {r0-r7, ip, lr} \n" /* Restore context */ | 115 | "ldmfd sp!, {r0-r7, ip, lr} \n" /* Restore context */ |
@@ -228,6 +226,12 @@ void system_init(void) | |||
228 | sdram_init(); | 226 | sdram_init(); |
229 | 227 | ||
230 | CGU_PERI |= (5<<2)|0x01; /* pclk = PLLA / 6 = 64 MHz */ | 228 | CGU_PERI |= (5<<2)|0x01; /* pclk = PLLA / 6 = 64 MHz */ |
229 | |||
230 | #if 0 /* we don't use interrupts at the moment */ | ||
231 | /* enable VIC */ | ||
232 | CGU_PERI |= CGU_VIC_CLOCK_ENABLE; | ||
233 | VIC_INT_SELECT = 0; /* only IRQ, no FIQ */ | ||
234 | #endif | ||
231 | } | 235 | } |
232 | 236 | ||
233 | void system_reboot(void) | 237 | void system_reboot(void) |