diff options
author | Mark.Zhan <rongkai.zhan@windriver.com> | 2006-06-20 06:15:02 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-06-29 16:10:34 -0400 |
commit | 9247857f5acadf0ea87fd6a9514c633644634f08 (patch) | |
tree | 77ce13d9b8ef0076622a0225ac6b8b1607a80260 /arch/mips/gt64120/wrppmc/irq.c | |
parent | 0a6047eef1c465c38aacfbdab193161b3f0cd144 (diff) |
[MIPS] Fix the build error of Wind River PPMC board, rewrite irq code to C
o Fix the build error Wind River PPMC board caused by the change of
plat_setup hook interface.
o Rewrite first level interrupt dispatch code to C.
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/irq.c')
-rw-r--r-- | arch/mips/gt64120/wrppmc/irq.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c index 8605687e24ed..26cf360f1694 100644 --- a/arch/mips/gt64120/wrppmc/irq.c +++ b/arch/mips/gt64120/wrppmc/irq.c | |||
@@ -30,7 +30,19 @@ | |||
30 | #include <asm/irq_cpu.h> | 30 | #include <asm/irq_cpu.h> |
31 | #include <asm/gt64120.h> | 31 | #include <asm/gt64120.h> |
32 | 32 | ||
33 | extern asmlinkage void handle_IRQ(void); | 33 | asmlinkage void plat_irq_dispatch(struct pt_regs *regs) |
34 | { | ||
35 | unsigned int pending = read_c0_status() & read_c0_cause(); | ||
36 | |||
37 | if (pending & STATUSF_IP7) | ||
38 | do_IRQ(WRPPMC_MIPS_TIMER_IRQ, regs); /* CPU Compare/Count internal timer */ | ||
39 | else if (pending & STATUSF_IP6) | ||
40 | do_IRQ(WRPPMC_UART16550_IRQ, regs); /* UART 16550 port */ | ||
41 | else if (pending & STATUSF_IP3) | ||
42 | do_IRQ(WRPPMC_PCI_INTA_IRQ, regs); /* PCI INT_A */ | ||
43 | else | ||
44 | spurious_interrupt(regs); | ||
45 | } | ||
34 | 46 | ||
35 | /** | 47 | /** |
36 | * Initialize GT64120 Interrupt Controller | 48 | * Initialize GT64120 Interrupt Controller |
@@ -53,9 +65,6 @@ void __init arch_init_irq(void) | |||
53 | /* enable all CPU interrupt bits. */ | 65 | /* enable all CPU interrupt bits. */ |
54 | set_c0_status(ST0_IM); /* IE bit is still 0 */ | 66 | set_c0_status(ST0_IM); /* IE bit is still 0 */ |
55 | 67 | ||
56 | /* Install MIPS Interrupt Trap Vector */ | ||
57 | set_except_vector(0, handle_IRQ); | ||
58 | |||
59 | /* IRQ 0 - 7 are for MIPS common irq_cpu controller */ | 68 | /* IRQ 0 - 7 are for MIPS common irq_cpu controller */ |
60 | mips_cpu_irq_init(0); | 69 | mips_cpu_irq_init(0); |
61 | 70 | ||