3 * arch-arm/mach-u300/include/mach/entry-macro.S
6 * Copyright (C) 2006-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * Low-level IRQ helper macros for ST-Ericsson U300
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
11 #include <mach/hardware.h>
12 #include <asm/hardware/vic.h>
17 .macro get_irqnr_preamble, base, tmp
20 .macro arch_ret_to_user, tmp1, tmp2
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE
25 ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
29 1001: ldr \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON1_BASE
30 ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
34 1002: tst \irqstat, #1
36 add \irqnr, \irqnr, #1
37 movs \irqstat, \irqstat, lsr #1
39 1003: /* EQ will be set if no irqs pending */