2 * include/asm-arm/arch-ks8695/entry-macro.S
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
7 * Low-level IRQ helper macros for KS8695
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
14 #include <asm/hardware.h>
15 #include <asm/arch/regs-irq.h>
20 .macro get_irqnr_preamble, base, tmp
21 ldr \base, =KS8695_IRQ_VA @ Base address of interrupt controller
24 .macro arch_ret_to_user, tmp1, tmp2
27 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
28 ldr \irqstat, [\base, #KS8695_INTMS] @ Mask Status register
36 moveq \irqstat, \irqstat, lsr #8
37 addeq \irqnr, \irqnr, #8
39 moveq \irqstat, \irqstat, lsr #8
40 addeq \irqnr, \irqnr, #8
42 moveq \irqstat, \irqstat, lsr #8
43 addeq \irqnr, \irqnr, #8
45 moveq \irqstat, \irqstat, lsr #4
46 addeq \irqnr, \irqnr, #4
48 moveq \irqstat, \irqstat, lsr #2
49 addeq \irqnr, \irqnr, #2
51 addeqs \irqnr, \irqnr, #1