diff options
author | Philippe Gerum <rpm@xenomai.org> | 2009-06-15 23:25:42 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-22 21:15:54 -0400 |
commit | a40494a62a11dbaf326397aa94b2018ead09884d (patch) | |
tree | 2440b4b4b510393ff057761021e9b218a5e1e142 | |
parent | 06ecc190f3928850cb77c498f745fc8e9a7e2fd7 (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>
-rw-r--r-- | arch/blackfin/Kconfig | 1 | ||||
-rw-r--r-- | arch/blackfin/include/asm/ipipe.h | 7 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 47 |
3 files changed, 28 insertions, 27 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index c2c4a62b6762..8140a2fc8bbd 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -623,7 +623,6 @@ choice | |||
623 | config TICKSOURCE_GPTMR0 | 623 | config TICKSOURCE_GPTMR0 |
624 | bool "Gptimer0 (SCLK domain)" | 624 | bool "Gptimer0 (SCLK domain)" |
625 | select BFIN_GPTIMERS | 625 | select BFIN_GPTIMERS |
626 | depends on !IPIPE | ||
627 | 626 | ||
628 | config TICKSOURCE_CORETMR | 627 | config TICKSOURCE_CORETMR |
629 | bool "Core timer (CCLK domain)" | 628 | bool "Core timer (CCLK domain)" |
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h index bbe1c3726b69..ffa5e60faa9f 100644 --- a/arch/blackfin/include/asm/ipipe.h +++ b/arch/blackfin/include/asm/ipipe.h | |||
@@ -207,7 +207,7 @@ void ipipe_init_irq_threads(void); | |||
207 | 207 | ||
208 | int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); | 208 | int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); |
209 | 209 | ||
210 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 210 | #ifdef CONFIG_TICKSOURCE_CORETMR |
211 | #define IRQ_SYSTMR IRQ_CORETMR | 211 | #define IRQ_SYSTMR IRQ_CORETMR |
212 | #define IRQ_PRIOTMR IRQ_CORETMR | 212 | #define IRQ_PRIOTMR IRQ_CORETMR |
213 | #else | 213 | #else |
@@ -240,8 +240,13 @@ int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); | |||
240 | #define ipipe_init_irq_threads() do { } while (0) | 240 | #define ipipe_init_irq_threads() do { } while (0) |
241 | #define ipipe_start_irq_thread(irq, desc) 0 | 241 | #define ipipe_start_irq_thread(irq, desc) 0 |
242 | 242 | ||
243 | #ifndef CONFIG_TICKSOURCE_GPTMR0 | ||
243 | #define IRQ_SYSTMR IRQ_CORETMR | 244 | #define IRQ_SYSTMR IRQ_CORETMR |
244 | #define IRQ_PRIOTMR IRQ_CORETMR | 245 | #define IRQ_PRIOTMR IRQ_CORETMR |
246 | #else | ||
247 | #define IRQ_SYSTMR IRQ_TIMER0 | ||
248 | #define IRQ_PRIOTMR CONFIG_IRQ_TIMER0 | ||
249 | #endif | ||
245 | 250 | ||
246 | #define __ipipe_root_tick_p(regs) 1 | 251 | #define __ipipe_root_tick_p(regs) 1 |
247 | 252 | ||
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)) | |||
1224 | asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs) | 1223 | asmlinkage 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. */ |