blob: cbaf6050154a82c0e2d92bcf13e7b3dae923e331 [file] [log] [blame]
SAN People73a59c12006-01-09 17:05:41 +00001/*
Andrew Victor9d041262007-02-05 11:42:07 +01002 * include/asm-arm/arch-at91/entry-macro.S
SAN People73a59c12006-01-09 17:05:41 +00003 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Low-level IRQ helper macros for AT91RM9200 platforms
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
Russell Kingbe509722008-08-04 10:41:28 +010013#include <asm/arch/hardware.h>
Andrew Victor55d8bae2006-11-30 17:16:43 +010014#include <asm/arch/at91_aic.h>
SAN People73a59c12006-01-09 17:05:41 +000015
16 .macro disable_fiq
17 .endm
18
Russell Kinge80a0e62007-02-20 10:52:01 +000019 .macro get_irqnr_preamble, base, tmp
Marc Pignat156864f2007-12-03 12:58:24 +010020 ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral
Russell Kinge80a0e62007-02-20 10:52:01 +000021 .endm
22
23 .macro arch_ret_to_user, tmp1, tmp2
24 .endm
25
SAN People73a59c12006-01-09 17:05:41 +000026 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
Andrew Victord0760b32007-02-08 09:00:39 +010027 ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt)
28 ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)] @ read interrupt source number
29 teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt
30 streq \tmp, [\base, #(AT91_AIC_EOICR - AT91_AIC)] @ not going to be handled further, then ACK it now.
SAN People73a59c12006-01-09 17:05:41 +000031 .endm
32