diff options
Diffstat (limited to 'arch/arm/mach-omap1/include/mach/entry-macro.S')
-rw-r--r-- | arch/arm/mach-omap1/include/mach/entry-macro.S | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S new file mode 100644 index 000000000000..df9060edda28 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for OMAP-based platforms | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/io.h> | ||
14 | #include <mach/irqs.h> | ||
15 | #include <asm/hardware/gic.h> | ||
16 | |||
17 | #if (defined(CONFIG_ARCH_OMAP730)||defined(CONFIG_ARCH_OMAP850)) && \ | ||
18 | (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)) | ||
19 | #error "FIXME: OMAP7XX doesn't support multiple-OMAP" | ||
20 | #elif defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | ||
21 | #define INT_IH2_IRQ INT_7XX_IH2_IRQ | ||
22 | #elif defined(CONFIG_ARCH_OMAP15XX) | ||
23 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
24 | #elif defined(CONFIG_ARCH_OMAP16XX) | ||
25 | #define INT_IH2_IRQ INT_1610_IH2_IRQ | ||
26 | #else | ||
27 | #warning "IH2 IRQ defaulted" | ||
28 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
29 | #endif | ||
30 | |||
31 | .macro disable_fiq | ||
32 | .endm | ||
33 | |||
34 | .macro get_irqnr_preamble, base, tmp | ||
35 | .endm | ||
36 | |||
37 | .macro arch_ret_to_user, tmp1, tmp2 | ||
38 | .endm | ||
39 | |||
40 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
41 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) | ||
42 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | ||
43 | ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] | ||
44 | mov \irqstat, #0xffffffff | ||
45 | bic \tmp, \irqstat, \tmp | ||
46 | tst \irqnr, \tmp | ||
47 | beq 1510f | ||
48 | |||
49 | ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] | ||
50 | cmp \irqnr, #0 | ||
51 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
52 | cmpeq \irqnr, #INT_IH2_IRQ | ||
53 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) | ||
54 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
55 | addeqs \irqnr, \irqnr, #32 | ||
56 | 1510: | ||
57 | .endm | ||
58 | |||