aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/include/mach/entry-macro.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 19:50:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 19:50:35 -0500
commit3c0cb7c31c206aaedb967e44b98442bbeb17a6c4 (patch)
tree3ecba45d7ffae4fba4a5aafaef4af5b0b1105bde /arch/arm/mach-realview/include/mach/entry-macro.S
parentf70f5b9dc74ca7d0a64c4ead3fb28da09dc1b234 (diff)
parent404a02cbd2ae8bf256a2fa1169bdfe86bb5ebb34 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits) ARM: DMA: add support for DMA debugging ARM: PL011: add DMA burst threshold support for ST variants ARM: PL011: Add support for transmit DMA ARM: PL011: Ensure IRQs are disabled in UART interrupt handler ARM: PL011: Separate hardware FIFO size from TTY FIFO size ARM: PL011: Allow better handling of vendor data ARM: PL011: Ensure error flags are clear at startup ARM: PL011: include revision number in boot-time port printk ARM: vexpress: add sched_clock() for Versatile Express ARM i.MX53: Make MX53 EVK bootable ARM i.MX53: Some bug fix about MX53 MSL code ARM: 6607/1: sa1100: Update platform device registration ARM: 6606/1: sa1100: Fix platform device registration ARM i.MX51: rename IPU irqs ARM i.MX51: Add ipu clock support ARM: imx/mx27_3ds: Add PMIC support ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn() mx51: fix usb clock support MX51: Add support for usb host 2 arch/arm/plat-mxc/ehci.c: fix errors/typos ...
Diffstat (limited to 'arch/arm/mach-realview/include/mach/entry-macro.S')
-rw-r--r--arch/arm/mach-realview/include/mach/entry-macro.S65
1 files changed, 1 insertions, 64 deletions
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S
index 340a5c276946..4071164aebaa 100644
--- a/arch/arm/mach-realview/include/mach/entry-macro.S
+++ b/arch/arm/mach-realview/include/mach/entry-macro.S
@@ -8,74 +8,11 @@
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <mach/hardware.h> 10#include <mach/hardware.h>
11#include <asm/hardware/gic.h> 11#include <asm/hardware/entry-macro-gic.S>
12 12
13 .macro disable_fiq 13 .macro disable_fiq
14 .endm 14 .endm
15 15
16 .macro get_irqnr_preamble, base, tmp
17 ldr \base, =gic_cpu_base_addr
18 ldr \base, [\base]
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2 16 .macro arch_ret_to_user, tmp1, tmp2
22 .endm 17 .endm
23 18
24 /*
25 * The interrupt numbering scheme is defined in the
26 * interrupt controller spec. To wit:
27 *
28 * Interrupts 0-15 are IPI
29 * 16-28 are reserved
30 * 29-31 are local. We allow 30 to be used for the watchdog.
31 * 32-1020 are global
32 * 1021-1022 are reserved
33 * 1023 is "spurious" (no interrupt)
34 *
35 * For now, we ignore all local interrupts so only return an interrupt if it's
36 * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs.
37 *
38 * A simple read from the controller will tell us the number of the highest
39 * priority enabled interrupt. We then just need to check whether it is in the
40 * valid range for an IRQ (30-1020 inclusive).
41 */
42
43 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
44
45 ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */
46
47 ldr \tmp, =1021
48
49 bic \irqnr, \irqstat, #0x1c00
50
51 cmp \irqnr, #29
52 cmpcc \irqnr, \irqnr
53 cmpne \irqnr, \tmp
54 cmpcs \irqnr, \irqnr
55
56 .endm
57
58 /* We assume that irqstat (the raw value of the IRQ acknowledge
59 * register) is preserved from the macro above.
60 * If there is an IPI, we immediately signal end of interrupt on the
61 * controller, since this requires the original irqstat value which
62 * we won't easily be able to recreate later.
63 */
64
65 .macro test_for_ipi, irqnr, irqstat, base, tmp
66 bic \irqnr, \irqstat, #0x1c00
67 cmp \irqnr, #16
68 strcc \irqstat, [\base, #GIC_CPU_EOI]
69 cmpcs \irqnr, \irqnr
70 .endm
71
72 /* As above, this assumes that irqstat and base are preserved.. */
73
74 .macro test_for_ltirq, irqnr, irqstat, base, tmp
75 bic \irqnr, \irqstat, #0x1c00
76 mov \tmp, #0
77 cmp \irqnr, #29
78 moveq \tmp, #1
79 streq \irqstat, [\base, #GIC_CPU_EOI]
80 cmp \tmp, #0
81 .endm