diff options
author | Tomasz Malesinski <tomal@rockbox.org> | 2006-01-24 23:32:16 +0000 |
---|---|---|
committer | Tomasz Malesinski <tomal@rockbox.org> | 2006-01-24 23:32:16 +0000 |
commit | 27c616fd46bbaee58c54eddc9ed406e6810dd3ca (patch) | |
tree | 660cab0458e382e0d381a98068999dfc424a9d43 /firmware/system.c | |
parent | 01ab727b43fb5d71417394840b940190a119f343 (diff) | |
download | rockbox-27c616fd46bbaee58c54eddc9ed406e6810dd3ca.tar.gz rockbox-27c616fd46bbaee58c54eddc9ed406e6810dd3ca.zip |
made UIE for iPod common to all ARM targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8441 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/firmware/system.c b/firmware/system.c index 90b697885c..bc9f9de973 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -1104,20 +1104,7 @@ int system_memory_guard(int newmode) | |||
1104 | 1104 | ||
1105 | return oldmode; | 1105 | return oldmode; |
1106 | } | 1106 | } |
1107 | #elif CONFIG_CPU==PP5020 | 1107 | #elif defined(CPU_ARM) |
1108 | |||
1109 | #ifndef BOOTLOADER | ||
1110 | extern void TIMER1(void); | ||
1111 | extern void ipod_4g_button_int(void); | ||
1112 | |||
1113 | void irq(void) | ||
1114 | { | ||
1115 | if (CPU_INT_STAT & TIMER1_MASK) | ||
1116 | TIMER1(); | ||
1117 | else if (CPU_HI_INT_STAT & I2C_MASK) | ||
1118 | ipod_4g_button_int(); | ||
1119 | } | ||
1120 | #endif | ||
1121 | 1108 | ||
1122 | static const char* const uiename[] = { | 1109 | static const char* const uiename[] = { |
1123 | "Undefined instruction", "Prefetch abort", "Data abort" | 1110 | "Undefined instruction", "Prefetch abort", "Data abort" |
@@ -1147,6 +1134,21 @@ void UIE(unsigned int pc, unsigned int num) | |||
1147 | } | 1134 | } |
1148 | } | 1135 | } |
1149 | 1136 | ||
1137 | #if CONFIG_CPU==PP5020 | ||
1138 | |||
1139 | #ifndef BOOTLOADER | ||
1140 | extern void TIMER1(void); | ||
1141 | extern void ipod_4g_button_int(void); | ||
1142 | |||
1143 | void irq(void) | ||
1144 | { | ||
1145 | if (CPU_INT_STAT & TIMER1_MASK) | ||
1146 | TIMER1(); | ||
1147 | else if (CPU_HI_INT_STAT & I2C_MASK) | ||
1148 | ipod_4g_button_int(); | ||
1149 | } | ||
1150 | #endif | ||
1151 | |||
1150 | /* TODO: The following two function have been lifted straight from IPL, and | 1152 | /* TODO: The following two function have been lifted straight from IPL, and |
1151 | hence have a lot of numeric addresses used straight. I'd like to use | 1153 | hence have a lot of numeric addresses used straight. I'd like to use |
1152 | #defines for these, but don't know what most of them are for or even what | 1154 | #defines for these, but don't know what most of them are for or even what |
@@ -1245,7 +1247,9 @@ static inline unsigned long irq_read(int reg) | |||
1245 | } while ((v != v2) || !(cond)); \ | 1247 | } while ((v != v2) || !(cond)); \ |
1246 | } while (0); | 1248 | } while (0); |
1247 | 1249 | ||
1248 | static void UIE(void) {} | 1250 | static void undefined_int(void) |
1251 | { | ||
1252 | } | ||
1249 | 1253 | ||
1250 | void irq(void) | 1254 | void irq(void) |
1251 | { | 1255 | { |
@@ -1282,9 +1286,9 @@ void system_init(void) | |||
1282 | IRQ_WRITE_WAIT(0x404 + i * 4, 0x1e000001, (v & 0x3010f) == 1); | 1286 | IRQ_WRITE_WAIT(0x404 + i * 4, 0x1e000001, (v & 0x3010f) == 1); |
1283 | IRQ_WRITE_WAIT(0x404 + i * 4, 0x4000000, (v & 0x10000) == 0); | 1287 | IRQ_WRITE_WAIT(0x404 + i * 4, 0x4000000, (v & 0x10000) == 0); |
1284 | IRQ_WRITE_WAIT(0x404 + i * 4, 0x10000001, (v & 0xf) == 1); | 1288 | IRQ_WRITE_WAIT(0x404 + i * 4, 0x10000001, (v & 0xf) == 1); |
1285 | interrupt_vector[i + 1] = UIE; | 1289 | interrupt_vector[i + 1] = undefined_int; |
1286 | } | 1290 | } |
1287 | interrupt_vector[0] = UIE; | 1291 | interrupt_vector[0] = undefined_int; |
1288 | } | 1292 | } |
1289 | 1293 | ||
1290 | 1294 | ||
@@ -1300,5 +1304,6 @@ int system_memory_guard(int newmode) | |||
1300 | return 0; | 1304 | return 0; |
1301 | } | 1305 | } |
1302 | 1306 | ||
1307 | #endif /* CPU_ARM */ | ||
1303 | #endif /* CONFIG_CPU */ | 1308 | #endif /* CONFIG_CPU */ |
1304 | 1309 | ||