aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
authorPhilippe Gerum <rpm@xenomai.org>2009-06-15 23:25:42 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-22 21:15:54 -0400
commita40494a62a11dbaf326397aa94b2018ead09884d (patch)
tree2440b4b4b510393ff057761021e9b218a5e1e142 /arch/blackfin/mach-common
parent06ecc190f3928850cb77c498f745fc8e9a7e2fd7 (diff)
Blackfin: allow CONFIG_TICKSOURCE_GPTMR0 with interrupt pipeline
Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/ints-priority.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index af70f09acd55..b42150190d0e 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -1052,35 +1052,34 @@ 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_TICKSOURCE_GPTMR0)
1056 case IRQ_TIMER0:
1057 set_irq_handler(irq, handle_percpu_irq);
1058 break;
1059#endif
1060#ifdef CONFIG_SMP 1055#ifdef CONFIG_SMP
1061 case IRQ_SUPPLE_0: 1056 case IRQ_SUPPLE_0:
1062 case IRQ_SUPPLE_1: 1057 case IRQ_SUPPLE_1:
1063 set_irq_handler(irq, handle_percpu_irq); 1058 set_irq_handler(irq, handle_percpu_irq);
1064 break; 1059 break;
1065#endif 1060#endif
1066 default:
1067#ifdef CONFIG_IPIPE 1061#ifdef CONFIG_IPIPE
1068 /* 1062#ifndef CONFIG_TICKSOURCE_CORETMR
1069 * We want internal interrupt sources to be 1063 case IRQ_TIMER0:
1070 * masked, because ISRs may trigger interrupts 1064 set_irq_handler(irq, handle_simple_irq);
1071 * recursively (e.g. DMA), but interrupts are 1065 break;
1072 * _not_ masked at CPU level. So let's handle 1066#endif /* !CONFIG_TICKSOURCE_CORETMR */
1073 * most of them as level interrupts, except 1067 case IRQ_CORETMR:
1074 * the timer interrupt which is special. 1068 set_irq_handler(irq, handle_simple_irq);
1075 */ 1069 break;
1076 if (irq == IRQ_SYSTMR || irq == IRQ_CORETMR) 1070 default:
1077 set_irq_handler(irq, handle_simple_irq); 1071 set_irq_handler(irq, handle_level_irq);
1078 else 1072 break;
1079 set_irq_handler(irq, handle_level_irq);
1080#else /* !CONFIG_IPIPE */ 1073#else /* !CONFIG_IPIPE */
1074#ifdef CONFIG_TICKSOURCE_GPTMR0
1075 case IRQ_TIMER0:
1076 set_irq_handler(irq, handle_percpu_irq);
1077 break;
1078#endif /* CONFIG_TICKSOURCE_GPTMR0 */
1079 default:
1081 set_irq_handler(irq, handle_simple_irq); 1080 set_irq_handler(irq, handle_simple_irq);
1082#endif /* !CONFIG_IPIPE */
1083 break; 1081 break;
1082#endif /* !CONFIG_IPIPE */
1084 } 1083 }
1085 } 1084 }
1086 1085
@@ -1224,15 +1223,14 @@ __attribute__((l1_text))
1224asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs) 1223asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
1225{ 1224{
1226 struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr(); 1225 struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr();
1227 struct ipipe_domain *this_domain = ipipe_current_domain; 1226 struct ipipe_domain *this_domain = __ipipe_current_domain;
1228 struct ivgx *ivg_stop = ivg7_13[vec-IVG7].istop; 1227 struct ivgx *ivg_stop = ivg7_13[vec-IVG7].istop;
1229 struct ivgx *ivg = ivg7_13[vec-IVG7].ifirst; 1228 struct ivgx *ivg = ivg7_13[vec-IVG7].ifirst;
1230 int irq, s; 1229 int irq, s;
1231 1230
1232 if (likely(vec == EVT_IVTMR_P)) { 1231 if (likely(vec == EVT_IVTMR_P))
1233 irq = IRQ_CORETMR; 1232 irq = IRQ_CORETMR;
1234 1233 else {
1235 } else {
1236#if defined(SIC_ISR0) || defined(SICA_ISR0) 1234#if defined(SIC_ISR0) || defined(SICA_ISR0)
1237 unsigned long sic_status[3]; 1235 unsigned long sic_status[3];
1238 1236
@@ -1262,12 +1260,11 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
1262 break; 1260 break;
1263 } 1261 }
1264#endif 1262#endif
1265
1266 irq = ivg->irqno; 1263 irq = ivg->irqno;
1267 } 1264 }
1268 1265
1269 if (irq == IRQ_SYSTMR) { 1266 if (irq == IRQ_SYSTMR) {
1270#ifndef CONFIG_GENERIC_CLOCKEVENTS 1267#if !defined(CONFIG_GENERIC_CLOCKEVENTS) || defined(CONFIG_TICKSOURCE_GPTMR0)
1271 bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */ 1268 bfin_write_TIMER_STATUS(1); /* Latch TIMIL0 */
1272#endif 1269#endif
1273 /* This is basically what we need from the register frame. */ 1270 /* This is basically what we need from the register frame. */