1 /* linux/arch/arm/mach-s5pv210/include/mach/entry-macro.S
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * Low-level IRQ helper macros for the Samsung S5PV210
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.
13 #include <asm/hardware/vic.h>
15 #include <plat/irqs.h>
20 .macro get_irqnr_preamble, base, tmp
24 .macro arch_ret_to_user, tmp1, tmp2
27 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
30 mov \irqnr, # S5P_IRQ_OFFSET + 31
31 ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
35 addeq \tmp, \base, #(VA_VIC1 - VA_VIC0)
36 addeq \irqnr, \irqnr, #32
37 ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
41 addeq \tmp, \base, #(VA_VIC2 - VA_VIC0)
42 addeq \irqnr, \irqnr, #32
43 ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
47 addeq \tmp, \base, #(VA_VIC3 - VA_VIC0)
48 addeq \irqnr, \irqnr, #32
49 ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
52 clzne \irqstat, \irqstat
53 subne \irqnr, \irqnr, \irqstat