2 * include/asm-arm/arch-omap/entry-macro.S
4 * Low-level IRQ helper macros for OMAP-based platforms
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.
11 #if defined(CONFIG_ARCH_OMAP1)
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
25 ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
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
35 #elif defined(CONFIG_ARCH_OMAP24XX)
37 #include <asm/arch/omap24xx.h>
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 */
47 ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
50 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
53 ldrne \irqnr, [\base, #IRQ_SIR_IRQ]