diff options
author | Mark.Zhan <rongkai.zhan@windriver.com> | 2006-05-06 05:04:20 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-06-19 12:39:18 -0400 |
commit | a240a469649eaab03f0c4c7fbb21ea5041bf5572 (patch) | |
tree | 71801adbf35a8a449a76398a4a5d7c34066313b4 /arch/mips/gt64120/wrppmc/int-handler.S | |
parent | a643d2b57403dc943fd4d9a3c803addd1c6b0ddc (diff) |
[MIPS] Wind River 4KC PPMC Eval Board Support
Support for the GT-64120-based Wind River 4KC PPMC Evaluation board.
Signed-off-by: Rongkai.Zhan <Rongkai.zhan@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/gt64120/wrppmc/int-handler.S')
-rw-r--r-- | arch/mips/gt64120/wrppmc/int-handler.S | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/mips/gt64120/wrppmc/int-handler.S b/arch/mips/gt64120/wrppmc/int-handler.S new file mode 100644 index 000000000000..edee7b394175 --- /dev/null +++ b/arch/mips/gt64120/wrppmc/int-handler.S | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1995, 1996, 1997, 2003 by Ralf Baechle | ||
7 | * Copyright (C) Wind River System Inc. Rongkai.Zhan <rongkai.zhan@windriver.com> | ||
8 | */ | ||
9 | #include <asm/asm.h> | ||
10 | #include <asm/mipsregs.h> | ||
11 | #include <asm/addrspace.h> | ||
12 | #include <asm/regdef.h> | ||
13 | #include <asm/stackframe.h> | ||
14 | #include <asm/mach-wrppmc/mach-gt64120.h> | ||
15 | |||
16 | .align 5 | ||
17 | .set noat | ||
18 | NESTED(handle_IRQ, PT_SIZE, sp) | ||
19 | SAVE_ALL | ||
20 | CLI # Important: mark KERNEL mode ! | ||
21 | .set at | ||
22 | |||
23 | mfc0 t0, CP0_CAUSE # get pending interrupts | ||
24 | mfc0 t1, CP0_STATUS # get enabled interrupts | ||
25 | and t0, t0, t1 # get allowed interrupts | ||
26 | andi t0, t0, 0xFF00 | ||
27 | beqz t0, 1f | ||
28 | move a1, sp # Prepare 'struct pt_regs *regs' pointer | ||
29 | |||
30 | andi t1, t0, CAUSEF_IP7 # CPU Compare/Count internal timer | ||
31 | bnez t1, handle_cputimer_irq | ||
32 | andi t1, t0, CAUSEF_IP6 # UART 16550 port | ||
33 | bnez t1, handle_uart_irq | ||
34 | andi t1, t0, CAUSEF_IP3 # PCI INT_A | ||
35 | bnez t1, handle_pci_intA_irq | ||
36 | |||
37 | /* wrong alarm or masked ... */ | ||
38 | 1: j spurious_interrupt | ||
39 | nop | ||
40 | END(handle_IRQ) | ||
41 | |||
42 | .align 5 | ||
43 | handle_cputimer_irq: | ||
44 | li a0, WRPPMC_MIPS_TIMER_IRQ | ||
45 | jal do_IRQ | ||
46 | j ret_from_irq | ||
47 | |||
48 | .align 5 | ||
49 | handle_uart_irq: | ||
50 | li a0, WRPPMC_UART16550_IRQ | ||
51 | jal do_IRQ | ||
52 | j ret_from_irq | ||
53 | |||
54 | .align 5 | ||
55 | handle_pci_intA_irq: | ||
56 | li a0, WRPPMC_PCI_INTA_IRQ | ||
57 | jal do_IRQ | ||
58 | j ret_from_irq | ||
59 | |||