1 /* arch/arm/mach-tegra/include/mach/entry-macro.S
3 * Copyright (C) 2009 Palm, Inc.
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include <mach/iomap.h>
18 #if defined(CONFIG_ARM_GIC)
19 #define HAVE_GET_IRQNR_PREAMBLE
20 #include <asm/hardware/entry-macro-gic.S>
22 /* Uses the GIC interrupt controller built into the cpu */
23 #define ICTRL_BASE (IO_CPU_VIRT + 0x100)
28 .macro get_irqnr_preamble, base, tmp
29 movw \base, #(ICTRL_BASE & 0x0000ffff)
30 movt \base, #((ICTRL_BASE & 0xffff0000) >> 16)
33 .macro arch_ret_to_user, tmp1, tmp2
36 /* legacy interrupt controller for AP16 */
40 .macro get_irqnr_preamble, base, tmp
41 @ enable imprecise aborts
43 @ EVP base at 0xf010f000
44 mov \base, #0xf0000000
45 orr \base, #0x00100000
46 orr \base, #0x0000f000
49 .macro arch_ret_to_user, tmp1, tmp2
52 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
53 ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS