diff options
-rw-r--r-- | include/asm-arm/arch-imx/entry-macro.S | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/asm-arm/arch-imx/entry-macro.S b/include/asm-arm/arch-imx/entry-macro.S index 3b9ef6914627..61bb0bdc1b16 100644 --- a/include/asm-arm/arch-imx/entry-macro.S +++ b/include/asm-arm/arch-imx/entry-macro.S | |||
@@ -13,19 +13,13 @@ | |||
13 | .endm | 13 | .endm |
14 | #define AITC_NIVECSR 0x40 | 14 | #define AITC_NIVECSR 0x40 |
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | ldr \irqstat, =IO_ADDRESS(IMX_AITC_BASE) | 16 | ldr \base, =IO_ADDRESS(IMX_AITC_BASE) |
17 | @ Load offset & priority of the highest priority | 17 | @ Load offset & priority of the highest priority |
18 | @ interrupt pending. | 18 | @ interrupt pending. |
19 | ldr \irqnr, [\irqstat, #AITC_NIVECSR] | 19 | ldr \irqstat, [\base, #AITC_NIVECSR] |
20 | @ Shift off the priority leaving the offset or | 20 | @ Shift off the priority leaving the offset or |
21 | @ "interrupt number" | 21 | @ "interrupt number", use arithmetic shift to |
22 | mov \irqnr, \irqnr, lsr #16 | 22 | @ transform illegal source (0xffff) as -1 |
23 | ldr \irqstat, =1 @ dummy compare | 23 | mov \irqnr, \irqstat, asr #16 |
24 | ldr \base, =0xFFFF // invalid interrupt | 24 | adds \tmp, \irqnr, #1 |
25 | cmp \irqnr, \base | ||
26 | bne 1001f | ||
27 | ldr \irqstat, =0 | ||
28 | 1001: | ||
29 | tst \irqstat, #1 @ to make the condition code = TRUE | ||
30 | .endm | 25 | .endm |
31 | |||