ARM: tegra: fix compilation error due to mach/hardware.h removal
[linux-btrfs-devel.git] / arch / arm / plat-tcc / include / mach / entry-macro.S
blob748f401e4b6d15c7462af8e1e9278da32491c627
1 /*
2  * include/asm-arm/arch-tcc83x/entry-macro.S
3  *
4  * Author : <linux@telechips.com>
5  * Created: June 10, 2008
6  * Description: Low-level IRQ helper macros for Telechips-based platforms
7  *
8  * Copyright (C) 2008-2009 Telechips
9  *
10  * This file is licensed under  the terms of the GNU General Public
11  * License version 2. This program is licensed "as is" without any
12  * warranty of any kind, whether express or implied.
13  */
15 #include <mach/hardware.h>
16 #include <mach/irqs.h>
18         .macro  disable_fiq
19         .endm
21         .macro  get_irqnr_preamble, base, tmp
22         .endm
24         .macro  arch_ret_to_user, tmp1, tmp2
25         .endm
27         .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
29                 ldr     \base, =0xF2003000 @ base address of PIC registers
31                 @@ read MREQ register of PIC0
33                 mov     \irqnr, #0
34                 ldr     \irqstat, [\base, #0x00000014 ] @ lower 32 interrupts
35                 cmp     \irqstat, #0
36                 bne     1001f
38                 @@ read MREQ register of PIC1
40                 ldr     \irqstat, [\base, #0x00000094]  @ upper 32 interrupts
41                 cmp     \irqstat, #0
42                 beq     1002f
43                 mov     \irqnr, #0x20
45 1001:
46                 movs    \tmp, \irqstat, lsl #16
47                 movne   \irqstat, \tmp
48                 addeq   \irqnr, \irqnr, #16
50                 movs    \tmp, \irqstat, lsl #8
51                 movne   \irqstat, \tmp
52                 addeq   \irqnr, \irqnr, #8
54                 movs    \tmp, \irqstat, lsl #4
55                 movne   \irqstat, \tmp
56                 addeq   \irqnr, \irqnr, #4
58                 movs    \tmp, \irqstat, lsl #2
59                 movne   \irqstat, \tmp
60                 addeq   \irqnr, \irqnr, #2
62                 movs    \tmp, \irqstat, lsl #1
63                 addeq   \irqnr, \irqnr, #1
64                 orrs    \base, \base, #1
65 1002:
66                 @@ exit here, Z flag unset if IRQ
68         .endm