Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / arch / arm / mach-s5p6442 / include / mach / entry-macro.S
1 /* linux/arch/arm/mach-s5p6442/include/mach/entry-macro.S
2  *
3  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * Low-level IRQ helper macros for the Samsung S5P6442
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11 */
12
13 #include <asm/hardware/vic.h>
14 #include <mach/map.h>
15 #include <plat/irqs.h>
16
17         .macro  disable_fiq
18         .endm
19
20         .macro  get_irqnr_preamble, base, tmp
21         ldr     \base, =VA_VIC0
22         .endm
23
24         .macro  arch_ret_to_user, tmp1, tmp2
25         .endm
26
27         .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
28
29         @ check the vic0
30         mov     \irqnr, # S5P_IRQ_OFFSET + 31
31         ldr     \irqstat, [ \base, # VIC_IRQ_STATUS ]
32         teq     \irqstat, #0
33
34         @ otherwise try vic1
35         addeq   \tmp, \base, #(VA_VIC1 - VA_VIC0)
36         addeq   \irqnr, \irqnr, #32
37         ldreq   \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
38         teqeq   \irqstat, #0
39
40         @ otherwise try vic2
41         addeq   \tmp, \base, #(VA_VIC2 - VA_VIC0)
42         addeq   \irqnr, \irqnr, #32
43         ldreq   \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
44         teqeq   \irqstat, #0
45
46         clzne   \irqstat, \irqstat
47         subne   \irqnr, \irqnr, \irqstat
48         .endm