ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / mach-lh7a40x / fiq.S
1 /*
2  *  linux/arch/arm/lib/lh7a400-fiqhandler.S
3  *     Copyright (C) 2002, Lineo, Inc.
4  *  based on  linux/arch/arm/lib/floppydma.S, which is
5  *      Copyright (C) 1995, 1996 Russell King
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  */
11 #include <linux/linkage.h>
12 #include <asm/assembler.h>
13        .text
14
15        .global fiqhandler_end
16
17        @ register usage:
18        @        r8  &interrupt controller registers
19        @        r9  &gpio registers
20        @       r11  work
21        @       r12  work
22
23 ENTRY(fiqhandler)
24
25        @ read the status register to find out which FIQ this is
26
27        ldr     r12, [r8]               @ intc->status
28        and     r12, r12, #0xf          @ only interested in low-order 4 bits
29
30        @ translate FIQ 0:3 to IRQ 23:26
31        @ disable this FIQ and enable the corresponding IRQ
32
33        str     r12, [r8, #0xc]         @ disable this FIQ
34        mov     r12, r12, lsl #23       @ get the corresopnding IRQ bit
35        str     r12, [r8, #0x8]         @ enable that IRQ
36
37        subs    pc, lr, #4
38 fiqhandler_end:
39