2 * arch/arm/mach-omap1/include/mach/entry-macro.S
4 * Low-level IRQ helper macros for OMAP-based platforms
6 * Copyright (C) 2009 Texas Instruments
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.
12 #include <mach/hardware.h>
14 #include <mach/irqs.h>
15 #include <asm/hardware/gic.h>
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
27 #warning "IH2 IRQ defaulted"
28 #define INT_IH2_IRQ INT_1510_IH2_IRQ
34 .macro get_irqnr_preamble, base, tmp
37 .macro arch_ret_to_user, tmp1, tmp2
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
49 ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
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