2 * Low-level IRQ helper macros for TI DaVinci-based platforms
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
11 #include <mach/irqs.h>
13 .macro get_irqnr_preamble, base, tmp
14 ldr \base, =davinci_intc_base
18 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
19 #if defined(CONFIG_AINTC) && defined(CONFIG_CP_INTC)
20 ldr \tmp, =davinci_intc_type
22 cmp \tmp, #DAVINCI_INTC_TYPE_CP_INTC
25 #if defined(CONFIG_AINTC)
26 ldr \tmp, [\base, #0x14]
27 movs \tmp, \tmp, lsr #2
31 #if defined(CONFIG_CP_INTC)
32 1001: ldr \irqnr, [\base, #0x80] /* get irq number */
33 mov \tmp, \irqnr, lsr #31
34 and \irqnr, \irqnr, #0xff /* irq is in bits 0-9 */