[TG3]: Add tagged status support.
[linux-2.6/verdex.git] / include / asm-arm / arch-ixp4xx / entry-macro.S
blob455da64832def5e966e343dd50cd97f9b76c18e9
1 /*
2  * include/asm-arm/arch-ixp4xx/entry-macro.S
3  *
4  * Low-level IRQ helper macros for IXP4xx-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  */
11                 .macro  disable_fiq
12                 .endm
14                 .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
15                 ldr     \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
16                 ldr     \irqstat, [\irqstat]            @ get interrupts
17                 cmp     \irqstat, #0
18                 beq     1001f
19                 clz     \irqnr, \irqstat
20                 mov     \base, #31
21                 subs    \irqnr, \base, \irqnr
23 1001:
24                 /*
25                  * IXP465 has an upper IRQ status register
26                  */
27 #if defined(CONFIG_CPU_IXP46X)
28                 bne     1002f
29                 ldr     \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
30                 ldr     \irqstat, [\irqstat]            @ get upper interrupts
31                 mov     \irqnr, #63
32                 clz     \irqstat, \irqstat
33                 cmp     \irqstat, #32
34                 subne   \irqnr, \irqnr, \irqstat
35 1002:
36 #endif
37                 .endm