ARM: OMAP2+: Limit omap_read/write usage to legacy USB drivers
[firefly-linux-kernel-4.4.55.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/io.h>
15 #include <mach/irqs.h>
16
17 #include "../../iomap.h"
18
19                 .macro  disable_fiq
20                 .endm
21
22                 .macro  get_irqnr_preamble, base, tmp
23                 .endm
24
25                 .macro  arch_ret_to_user, tmp1, tmp2
26                 .endm
27
28                 .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
29                 ldr     \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE)
30                 ldr     \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
31                 ldr     \tmp, [\base, #IRQ_MIR_REG_OFFSET]
32                 mov     \irqstat, #0xffffffff
33                 bic     \tmp, \irqstat, \tmp
34                 tst     \irqnr, \tmp
35                 beq     1510f
36
37                 ldr     \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
38                 ldr     \tmp, =omap_irq_flags   @ irq flags address
39                 ldr     \tmp, [\tmp, #0]        @ irq flags value
40                 cmp     \irqnr, #0
41                 ldreq   \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
42                 cmpeq   \irqnr, \tmp
43                 ldreq   \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE)
44                 ldreq   \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
45                 addeqs  \irqnr, \irqnr, #32
46 1510:
47                 .endm
48