diff options
author | Darius Augulis <augulis.darius@gmail.com> | 2008-09-09 05:29:41 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-09-09 06:13:50 -0400 |
commit | 479c901f59762732dee305166ae477171cae3617 (patch) | |
tree | b061499771021b431d54ec46fe66b3b31be4a37f /arch/arm/plat-mxc/include/mach/entry-macro.S | |
parent | d7568f79d5c289d0d7859680be7b5afdcea0c9b2 (diff) |
MXC: Lets handle IRQ by priority, defined with exported API function
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/entry-macro.S')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/entry-macro.S | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index b542433afb1b..11632028f7d1 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -9,11 +9,17 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define AVIC_NIMASK 0x04 | ||
13 | |||
12 | @ this macro disables fast irq (not implemented) | 14 | @ this macro disables fast irq (not implemented) |
13 | .macro disable_fiq | 15 | .macro disable_fiq |
14 | .endm | 16 | .endm |
15 | 17 | ||
16 | .macro get_irqnr_preamble, base, tmp | 18 | .macro get_irqnr_preamble, base, tmp |
19 | ldr \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR) | ||
20 | #ifdef CONFIG_MXC_IRQ_PRIOR | ||
21 | ldr r4, [\base, #AVIC_NIMASK] | ||
22 | #endif | ||
17 | .endm | 23 | .endm |
18 | 24 | ||
19 | .macro arch_ret_to_user, tmp1, tmp2 | 25 | .macro arch_ret_to_user, tmp1, tmp2 |
@@ -23,7 +29,6 @@ | |||
23 | @ and returns its number in irqnr | 29 | @ and returns its number in irqnr |
24 | @ and returns if an interrupt occured in irqstat | 30 | @ and returns if an interrupt occured in irqstat |
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
26 | ldr \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR) | ||
27 | @ Load offset & priority of the highest priority | 32 | @ Load offset & priority of the highest priority |
28 | @ interrupt pending from AVIC_NIVECSR | 33 | @ interrupt pending from AVIC_NIVECSR |
29 | ldr \irqstat, [\base, #0x40] | 34 | ldr \irqstat, [\base, #0x40] |
@@ -32,6 +37,11 @@ | |||
32 | mov \irqnr, \irqstat, asr #16 | 37 | mov \irqnr, \irqstat, asr #16 |
33 | @ set zero flag if IRQ + 1 == 0 | 38 | @ set zero flag if IRQ + 1 == 0 |
34 | adds \tmp, \irqnr, #1 | 39 | adds \tmp, \irqnr, #1 |
40 | #ifdef CONFIG_MXC_IRQ_PRIOR | ||
41 | bicne \tmp, \irqstat, #0xFFFFFFE0 | ||
42 | strne \tmp, [\base, #AVIC_NIMASK] | ||
43 | streq r4, [\base, #AVIC_NIMASK] | ||
44 | #endif | ||
35 | .endm | 45 | .endm |
36 | 46 | ||
37 | @ irq priority table (not used) | 47 | @ irq priority table (not used) |