1 /* arch/arm/mach-s3c6400/include/mach/entry-macro.S
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
8 * Low-level IRQ helper macros for the Samsung S3C64XX series
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.
15 #include <asm/hardware/vic.h>
17 #include <plat/irqs.h>
22 .macro get_irqnr_preamble, base, tmp
23 ldr \base, =S3C_VA_VIC0
26 .macro arch_ret_to_user, tmp1, tmp2
29 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
32 mov \irqnr, # S3C_IRQ_OFFSET + 31
33 ldr \irqstat, [ \base, # VIC_IRQ_STATUS ]
37 addeq \tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0)
38 addeq \irqnr, \irqnr, #32
39 ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
42 clzne \irqstat, \irqstat
43 subne \irqnr, \irqnr, \irqstat