Merge with /pub/scm/linux/kernel/git/sfrench/cifs-2.6.git/
[linux-2.6] / include / asm-arm / arch-omap / entry-macro.S
1 /*
2  * include/asm-arm/arch-omap/entry-macro.S
3  *
4  * Low-level IRQ helper macros for OMAP-based platforms
5  *
6  * This file is licensed under  the terms of the GNU General Public
7  * License version 2. This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10
11 #if defined(CONFIG_ARCH_OMAP1)
12
13                 .macro  disable_fiq
14                 .endm
15
16                 .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
17                 ldr     \base, =IO_ADDRESS(OMAP_IH1_BASE)
18                 ldr     \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
19                 ldr     \tmp, [\base, #IRQ_MIR_REG_OFFSET]
20                 mov     \irqstat, #0xffffffff
21                 bic     \tmp, \irqstat, \tmp
22                 tst     \irqnr, \tmp
23                 beq     1510f
24
25                 ldr     \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
26                 cmp     \irqnr, #0
27                 ldreq   \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
28                 cmpeq   \irqnr, #INT_IH2_IRQ
29                 ldreq   \base, =IO_ADDRESS(OMAP_IH2_BASE)
30                 ldreq   \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
31                 addeqs  \irqnr, \irqnr, #32
32 1510:
33                 .endm
34
35 #elif defined(CONFIG_ARCH_OMAP24XX)
36
37 #include <asm/arch/omap24xx.h>
38
39                 .macro  disable_fiq
40                 .endm
41
42                 .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
43                 ldr     \base, =VA_IC_BASE
44                 ldr     \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
45                 cmp     \irqnr, #0x0
46                 bne     2222f
47                 ldr     \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
48                 cmp     \irqnr, #0x0
49                 bne     2222f
50                 ldr     \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
51                 cmp     \irqnr, #0x0
52 2222:
53                 ldrne   \irqnr, [\base, #IRQ_SIR_IRQ]
54
55                 .endm
56
57                 .macro  irq_prio_table
58                 .endm
59
60 #endif