SAN People | 73a59c1 | 2006-01-09 17:05:41 +0000 | [diff] [blame] | 1 | /* |
Andrew Victor | 9d04126 | 2007-02-05 11:42:07 +0100 | [diff] [blame] | 2 | * include/asm-arm/arch-at91/entry-macro.S |
SAN People | 73a59c1 | 2006-01-09 17:05:41 +0000 | [diff] [blame] | 3 | * |
| 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 | |
| 13 | #include <asm/hardware.h> |
Andrew Victor | 55d8bae | 2006-11-30 17:16:43 +0100 | [diff] [blame] | 14 | #include <asm/arch/at91_aic.h> |
SAN People | 73a59c1 | 2006-01-09 17:05:41 +0000 | [diff] [blame] | 15 | |
| 16 | .macro disable_fiq |
| 17 | .endm |
| 18 | |
Russell King | e80a0e6 | 2007-02-20 10:52:01 +0000 | [diff] [blame] | 19 | .macro get_irqnr_preamble, base, tmp |
| 20 | .endm |
| 21 | |
| 22 | .macro arch_ret_to_user, tmp1, tmp2 |
| 23 | .endm |
| 24 | |
SAN People | 73a59c1 | 2006-01-09 17:05:41 +0000 | [diff] [blame] | 25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
Andrew Victor | d0760b3 | 2007-02-08 09:00:39 +0100 | [diff] [blame] | 26 | ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral |
| 27 | 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 People | 73a59c1 | 2006-01-09 17:05:41 +0000 | [diff] [blame] | 31 | .endm |
| 32 | |