2 * arch/arm/mach-ks8695/include/mach/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 <mach/hardware.h>
15 #include <mach/regs-irq.h>
17 .macro get_irqnr_preamble, base, tmp
18 ldr \base, =KS8695_IRQ_VA @ Base address of interrupt controller
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22 ldr \irqstat, [\base, #KS8695_INTMS] @ Mask Status register
30 moveq \irqstat, \irqstat, lsr #8
31 addeq \irqnr, \irqnr, #8
33 moveq \irqstat, \irqstat, lsr #8
34 addeq \irqnr, \irqnr, #8
36 moveq \irqstat, \irqstat, lsr #8
37 addeq \irqnr, \irqnr, #8
39 moveq \irqstat, \irqstat, lsr #4
40 addeq \irqnr, \irqnr, #4
42 moveq \irqstat, \irqstat, lsr #2
43 addeq \irqnr, \irqnr, #2
45 addeqs \irqnr, \irqnr, #1