ARM: davinci: remove unneeded mach/io.h include
[deliverable/linux.git] / arch / arm / mach-davinci / include / mach / entry-macro.S
CommitLineData
7c6337e2
KH
1/*
2 * Low-level IRQ helper macros for TI DaVinci-based platforms
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
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
9 * or implied.
10 */
a09e64fb 11#include <mach/irqs.h>
7c6337e2 12
7c6337e2 13 .macro get_irqnr_preamble, base, tmp
673dd36f
MG
14 ldr \base, =davinci_intc_base
15 ldr \base, [\base]
7c6337e2
KH
16 .endm
17
7c6337e2 18 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
0b0c4c2a
MG
19#if defined(CONFIG_AINTC) && defined(CONFIG_CP_INTC)
20 ldr \tmp, =davinci_intc_type
21 ldr \tmp, [\tmp]
22 cmp \tmp, #DAVINCI_INTC_TYPE_CP_INTC
23 beq 1001f
24#endif
25#if defined(CONFIG_AINTC)
7c6337e2 26 ldr \tmp, [\base, #0x14]
ce8ccaf0 27 movs \tmp, \tmp, lsr #2
7c6337e2 28 sub \irqnr, \tmp, #1
0b0c4c2a
MG
29 b 1002f
30#endif
31#if defined(CONFIG_CP_INTC)
321001: ldr \irqnr, [\base, #0x80] /* get irq number */
33 and \irqnr, \irqnr, #0xff /* irq is in bits 0-9 */
34 mov \tmp, \irqnr, lsr #3
35 and \tmp, \tmp, #0xfc
36 add \tmp, \tmp, #0x280 /* get the register offset */
37 ldr \irqstat, [\base, \tmp] /* get the intc status */
38 cmp \irqstat, #0x0
39#endif
401002:
7c6337e2 41 .endm
This page took 0.721058 seconds and 5 git commands to generate.