diff options
Diffstat (limited to 'arch/blackfin/mach-common/ints-priority.c')
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 50 |
1 files changed, 17 insertions, 33 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index a7d7b2dd4059..351afd0e36d8 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -1052,7 +1052,7 @@ int __init init_arch_irq(void) | |||
1052 | set_irq_chained_handler(irq, bfin_demux_error_irq); | 1052 | set_irq_chained_handler(irq, bfin_demux_error_irq); |
1053 | break; | 1053 | break; |
1054 | #endif | 1054 | #endif |
1055 | #if defined(CONFIG_TICK_SOURCE_SYSTMR0) || defined(CONFIG_IPIPE) | 1055 | #if defined(CONFIG_TICKSOURCE_GPTMR0) |
1056 | case IRQ_TIMER0: | 1056 | case IRQ_TIMER0: |
1057 | set_irq_handler(irq, handle_percpu_irq); | 1057 | set_irq_handler(irq, handle_percpu_irq); |
1058 | break; | 1058 | break; |
@@ -1116,6 +1116,9 @@ int __init init_arch_irq(void) | |||
1116 | IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | | 1116 | IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | |
1117 | IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; | 1117 | IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; |
1118 | 1118 | ||
1119 | /* This implicitly covers ANOMALY_05000171 | ||
1120 | * Boot-ROM code modifies SICA_IWRx wakeup registers | ||
1121 | */ | ||
1119 | #ifdef SIC_IWR0 | 1122 | #ifdef SIC_IWR0 |
1120 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); | 1123 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); |
1121 | # ifdef SIC_IWR1 | 1124 | # ifdef SIC_IWR1 |
@@ -1136,13 +1139,6 @@ int __init init_arch_irq(void) | |||
1136 | bfin_write_SIC_IWR(IWR_DISABLE_ALL); | 1139 | bfin_write_SIC_IWR(IWR_DISABLE_ALL); |
1137 | #endif | 1140 | #endif |
1138 | 1141 | ||
1139 | #ifdef CONFIG_IPIPE | ||
1140 | for (irq = 0; irq < NR_IRQS; irq++) { | ||
1141 | struct irq_desc *desc = irq_to_desc(irq); | ||
1142 | desc->ic_prio = __ipipe_get_irq_priority(irq); | ||
1143 | } | ||
1144 | #endif /* CONFIG_IPIPE */ | ||
1145 | |||
1146 | return 0; | 1142 | return 0; |
1147 | } | 1143 | } |
1148 | 1144 | ||
@@ -1156,23 +1152,22 @@ void do_irq(int vec, struct pt_regs *fp) | |||
1156 | } else { | 1152 | } else { |
1157 | struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; | 1153 | struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; |
1158 | struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; | 1154 | struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; |
1159 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) \ | 1155 | #if defined(SIC_ISR0) || defined(SICA_ISR0) |
1160 | || defined(BF538_FAMILY) || defined(CONFIG_BF51x) | ||
1161 | unsigned long sic_status[3]; | 1156 | unsigned long sic_status[3]; |
1162 | 1157 | ||
1163 | if (smp_processor_id()) { | 1158 | if (smp_processor_id()) { |
1164 | #ifdef CONFIG_SMP | 1159 | # ifdef SICB_ISR0 |
1165 | /* This will be optimized out in UP mode. */ | 1160 | /* This will be optimized out in UP mode. */ |
1166 | sic_status[0] = bfin_read_SICB_ISR0() & bfin_read_SICB_IMASK0(); | 1161 | sic_status[0] = bfin_read_SICB_ISR0() & bfin_read_SICB_IMASK0(); |
1167 | sic_status[1] = bfin_read_SICB_ISR1() & bfin_read_SICB_IMASK1(); | 1162 | sic_status[1] = bfin_read_SICB_ISR1() & bfin_read_SICB_IMASK1(); |
1168 | #endif | 1163 | # endif |
1169 | } else { | 1164 | } else { |
1170 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); | 1165 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); |
1171 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); | 1166 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); |
1172 | } | 1167 | } |
1173 | #ifdef CONFIG_BF54x | 1168 | # ifdef SIC_ISR2 |
1174 | sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); | 1169 | sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); |
1175 | #endif | 1170 | # endif |
1176 | for (;; ivg++) { | 1171 | for (;; ivg++) { |
1177 | if (ivg >= ivg_stop) { | 1172 | if (ivg >= ivg_stop) { |
1178 | atomic_inc(&num_spurious); | 1173 | atomic_inc(&num_spurious); |
@@ -1236,20 +1231,16 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs) | |||
1236 | 1231 | ||
1237 | if (likely(vec == EVT_IVTMR_P)) { | 1232 | if (likely(vec == EVT_IVTMR_P)) { |
1238 | irq = IRQ_CORETMR; | 1233 | irq = IRQ_CORETMR; |
1239 | goto core_tick; | ||
1240 | } | ||
1241 | 1234 | ||
1242 | SSYNC(); | 1235 | } else { |
1243 | 1236 | #if defined(SIC_ISR0) || defined(SICA_ISR0) | |
1244 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | ||
1245 | { | ||
1246 | unsigned long sic_status[3]; | 1237 | unsigned long sic_status[3]; |
1247 | 1238 | ||
1248 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); | 1239 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); |
1249 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); | 1240 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); |
1250 | #ifdef CONFIG_BF54x | 1241 | # ifdef SIC_ISR2 |
1251 | sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); | 1242 | sic_status[2] = bfin_read_SIC_ISR2() & bfin_read_SIC_IMASK2(); |
1252 | #endif | 1243 | # endif |
1253 | for (;; ivg++) { | 1244 | for (;; ivg++) { |
1254 | if (ivg >= ivg_stop) { | 1245 | if (ivg >= ivg_stop) { |
1255 | atomic_inc(&num_spurious); | 1246 | atomic_inc(&num_spurious); |
@@ -1258,9 +1249,7 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs) | |||
1258 | if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag) | 1249 | if (sic_status[(ivg->irqno - IVG7) / 32] & ivg->isrflag) |
1259 | break; | 1250 | break; |
1260 | } | 1251 | } |
1261 | } | ||
1262 | #else | 1252 | #else |
1263 | { | ||
1264 | unsigned long sic_status; | 1253 | unsigned long sic_status; |
1265 | 1254 | ||
1266 | sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); | 1255 | sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); |
@@ -1272,15 +1261,13 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs) | |||
1272 | } else if (sic_status & ivg->isrflag) | 1261 | } else if (sic_status & ivg->isrflag) |
1273 | break; | 1262 | break; |
1274 | } | 1263 | } |
1275 | } | ||
1276 | #endif | 1264 | #endif |
1277 | 1265 | ||
1278 | irq = ivg->irqno; | 1266 | irq = ivg->irqno; |
1267 | } | ||
1279 | 1268 | ||
1280 | if (irq == IRQ_SYSTMR) { | 1269 | if (irq == IRQ_SYSTMR) { |
1281 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 1270 | #ifndef CONFIG_GENERIC_CLOCKEVENTS |
1282 | core_tick: | ||
1283 | #else | ||
1284 | bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */ | 1271 | bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */ |
1285 | #endif | 1272 | #endif |
1286 | /* This is basically what we need from the register frame. */ | 1273 | /* This is basically what we need from the register frame. */ |
@@ -1292,9 +1279,6 @@ core_tick: | |||
1292 | __raw_get_cpu_var(__ipipe_tick_regs).ipend |= 0x10; | 1279 | __raw_get_cpu_var(__ipipe_tick_regs).ipend |= 0x10; |
1293 | } | 1280 | } |
1294 | 1281 | ||
1295 | #ifndef CONFIG_GENERIC_CLOCKEVENTS | ||
1296 | core_tick: | ||
1297 | #endif | ||
1298 | if (this_domain == ipipe_root_domain) { | 1282 | if (this_domain == ipipe_root_domain) { |
1299 | s = __test_and_set_bit(IPIPE_SYNCDEFER_FLAG, &p->status); | 1283 | s = __test_and_set_bit(IPIPE_SYNCDEFER_FLAG, &p->status); |
1300 | barrier(); | 1284 | barrier(); |
@@ -1312,7 +1296,7 @@ core_tick: | |||
1312 | } | 1296 | } |
1313 | } | 1297 | } |
1314 | 1298 | ||
1315 | return 0; | 1299 | return 0; |
1316 | } | 1300 | } |
1317 | 1301 | ||
1318 | #endif /* CONFIG_IPIPE */ | 1302 | #endif /* CONFIG_IPIPE */ |