2 * arch/arm/mach-ixp4xx/include/mach/entry-macro.S
4 * Low-level IRQ helper macros for IXP4xx-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.
10 #include <mach/hardware.h>
12 .macro get_irqnr_preamble, base, tmp
15 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
16 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
17 ldr \irqstat, [\irqstat] @ get interrupts
19 beq 1001f @ upper IRQ?
22 sub \irqnr, \base, \irqnr
23 b 1002f @ lower IRQ being
28 * IXP465/IXP435 has an upper IRQ status register
30 #if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
31 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
32 ldr \irqstat, [\irqstat] @ get upper interrupts
34 clz \irqstat, \irqstat
36 subne \irqnr, \irqnr, \irqstat