]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blob - arch/arm/mach-omap1/include/mach/entry-macro.S
ARM: zynq: add clk binding support to the ttc
[can-eth-gw-linux.git] / arch / arm / mach-omap1 / include / mach / entry-macro.S
1 /*
2  * arch/arm/mach-omap1/include/mach/entry-macro.S
3  *
4  * Low-level IRQ helper macros for OMAP-based platforms
5  *
6  * Copyright (C) 2009 Texas Instruments
7  *
8  * This file is licensed under  the terms of the GNU General Public
9  * License version 2. This program is licensed "as is" without any
10  * warranty of any kind, whether express or implied.
11  */
12
13 #include <mach/hardware.h>
14 #include <mach/irqs.h>
15
16 #include "../../iomap.h"
17
18                 .macro  get_irqnr_preamble, base, tmp
19                 .endm
20
21                 .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
22                 ldr     \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE)
23                 ldr     \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
24                 ldr     \tmp, [\base, #IRQ_MIR_REG_OFFSET]
25                 mov     \irqstat, #0xffffffff
26                 bic     \tmp, \irqstat, \tmp
27                 tst     \irqnr, \tmp
28                 beq     1510f
29
30                 ldr     \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
31                 ldr     \tmp, =omap_irq_flags   @ irq flags address
32                 ldr     \tmp, [\tmp, #0]        @ irq flags value
33                 cmp     \irqnr, #0
34                 ldreq   \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
35                 cmpeq   \irqnr, \tmp
36                 ldreq   \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE)
37                 ldreq   \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
38                 addeqs  \irqnr, \irqnr, #32
39 1510:
40                 .endm
41