aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/interrupt.S
diff options
context:
space:
mode:
authorYi Li <yi.li@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commit6a01f230339321292cf065551f8cf55361052461 (patch)
tree7ac2ac8fc9f05a7315ef6a7f6f0a387433c62c14 /arch/blackfin/mach-common/interrupt.S
parent5105432a3201e3f0e6c219cd0a74feee1e5e262b (diff)
Blackfin arch: merge adeos blackfin part to arch/blackfin/
[Mike Frysinger <vapier.adi@gmail.com>: - handle bf531/bf532/bf534/bf536 variants in ipipe.h - cleanup IPIPE logic for bfin_set_irq_handler() - cleanup ipipe asm code a bit and add missing ENDPROC() - simplify IPIPE code in trap_c - unify some of the IPIPE code and fix style - simplify DO_IRQ_L1 handling with ipipe code - revert IRQ_SW_INT# addition from ipipe merge - remove duplicate get_{c,s}clk() prototypes ] Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-common/interrupt.S')
-rw-r--r--arch/blackfin/mach-common/interrupt.S60
1 files changed, 60 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 2604b532897c..c1bdd1edc8eb 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -129,8 +129,15 @@ __common_int_entry:
129#endif 129#endif
130 r1 = sp; 130 r1 = sp;
131 SP += -12; 131 SP += -12;
132#ifdef CONFIG_IPIPE
133 call ___ipipe_grab_irq
134 SP += 12;
135 cc = r0 == 0;
136 if cc jump .Lcommon_restore_context;
137#else /* CONFIG_IPIPE */
132 call _do_irq; 138 call _do_irq;
133 SP += 12; 139 SP += 12;
140#endif /* CONFIG_IPIPE */
134 call _return_from_int; 141 call _return_from_int;
135.Lcommon_restore_context: 142.Lcommon_restore_context:
136 RESTORE_CONTEXT 143 RESTORE_CONTEXT
@@ -247,3 +254,56 @@ ENTRY(_evt_system_call)
247 call _system_call; 254 call _system_call;
248 jump .Lcommon_restore_context; 255 jump .Lcommon_restore_context;
249ENDPROC(_evt_system_call) 256ENDPROC(_evt_system_call)
257
258#ifdef CONFIG_IPIPE
259ENTRY(___ipipe_call_irqtail)
260 r0.l = 1f;
261 r0.h = 1f;
262 reti = r0;
263 rti;
2641:
265 [--sp] = rets;
266 [--sp] = ( r7:4, p5:3 );
267 p0.l = ___ipipe_irq_tail_hook;
268 p0.h = ___ipipe_irq_tail_hook;
269 p0 = [p0];
270 sp += -12;
271 call (p0);
272 sp += 12;
273 ( r7:4, p5:3 ) = [sp++];
274 rets = [sp++];
275
276 [--sp] = reti;
277 reti = [sp++]; /* IRQs are off. */
278 r0.h = 3f;
279 r0.l = 3f;
280 p0.l = lo(EVT14);
281 p0.h = hi(EVT14);
282 [p0] = r0;
283 csync;
284 r0 = 0x401f;
285 sti r0;
286 raise 14;
287 [--sp] = reti; /* IRQs on. */
2882:
289 jump 2b; /* Likely paranoid. */
2903:
291 sp += 4; /* Discard saved RETI */
292 r0.h = _evt14_softirq;
293 r0.l = _evt14_softirq;
294 p0.l = lo(EVT14);
295 p0.h = hi(EVT14);
296 [p0] = r0;
297 csync;
298 p0.l = _bfin_irq_flags;
299 p0.h = _bfin_irq_flags;
300 r0 = [p0];
301 sti r0;
302#if 0 /* FIXME: this actually raises scheduling latencies */
303 /* Reenable interrupts */
304 [--sp] = reti;
305 r0 = [sp++];
306#endif
307 rts;
308ENDPROC(___ipipe_call_irqtail)
309#endif /* CONFIG_IPIPE */