diff options
Diffstat (limited to 'arch/mips/galileo-boards')
-rw-r--r-- | arch/mips/galileo-boards/ev96100/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/galileo-boards/ev96100/int-handler.S | 34 | ||||
-rw-r--r-- | arch/mips/galileo-boards/ev96100/irq.c | 17 |
3 files changed, 15 insertions, 38 deletions
diff --git a/arch/mips/galileo-boards/ev96100/Makefile b/arch/mips/galileo-boards/ev96100/Makefile index 58c02f9db69d..cd868ec78cbc 100644 --- a/arch/mips/galileo-boards/ev96100/Makefile +++ b/arch/mips/galileo-boards/ev96100/Makefile | |||
@@ -6,4 +6,4 @@ | |||
6 | # Makefile for the Galileo EV96100 board. | 6 | # Makefile for the Galileo EV96100 board. |
7 | # | 7 | # |
8 | 8 | ||
9 | obj-y += init.o irq.o puts.o reset.o time.o int-handler.o setup.o | 9 | obj-y += init.o irq.o puts.o reset.o time.o setup.o |
diff --git a/arch/mips/galileo-boards/ev96100/int-handler.S b/arch/mips/galileo-boards/ev96100/int-handler.S deleted file mode 100644 index 0edf1fec2905..000000000000 --- a/arch/mips/galileo-boards/ev96100/int-handler.S +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | #include <asm/asm.h> | ||
2 | #include <asm/mipsregs.h> | ||
3 | #include <asm/regdef.h> | ||
4 | #include <asm/stackframe.h> | ||
5 | |||
6 | .set noat | ||
7 | .align 5 | ||
8 | |||
9 | NESTED(ev96100IRQ, PT_SIZE, sp) | ||
10 | SAVE_ALL | ||
11 | CLI # Important: mark KERNEL mode ! | ||
12 | |||
13 | mfc0 t0, CP0_CAUSE # get pending interrupts | ||
14 | mfc0 t1, CP0_STATUS # get enabled interrupts | ||
15 | and t0, t1 # isolate allowed ones | ||
16 | |||
17 | # FIX ME add R7000 extensions | ||
18 | andi t0,0xff00 # isolate pending bits | ||
19 | andi a0, t0, CAUSEF_IP7 | ||
20 | beq a0, zero, 1f | ||
21 | move a0, sp | ||
22 | jal mips_timer_interrupt | ||
23 | j ret_from_irq | ||
24 | |||
25 | 1: beqz t0, 3f # spurious interrupt | ||
26 | |||
27 | move a0, t0 | ||
28 | move a1, sp | ||
29 | jal ev96100_cpu_irq | ||
30 | j ret_from_irq | ||
31 | |||
32 | 3: jal spurious_interrupt | ||
33 | j ret_from_irq | ||
34 | END(ev96100IRQ) | ||
diff --git a/arch/mips/galileo-boards/ev96100/irq.c b/arch/mips/galileo-boards/ev96100/irq.c index 383801dd1b95..ee5d6720f23b 100644 --- a/arch/mips/galileo-boards/ev96100/irq.c +++ b/arch/mips/galileo-boards/ev96100/irq.c | |||
@@ -40,8 +40,6 @@ | |||
40 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
41 | #include <asm/irq_cpu.h> | 41 | #include <asm/irq_cpu.h> |
42 | 42 | ||
43 | extern asmlinkage void ev96100IRQ(void); | ||
44 | |||
45 | static inline unsigned int ffz8(unsigned int word) | 43 | static inline unsigned int ffz8(unsigned int word) |
46 | { | 44 | { |
47 | unsigned long k; | 45 | unsigned long k; |
@@ -54,13 +52,26 @@ static inline unsigned int ffz8(unsigned int word) | |||
54 | return k; | 52 | return k; |
55 | } | 53 | } |
56 | 54 | ||
55 | extern void mips_timer_interrupt(struct pt_regs *regs); | ||
56 | |||
57 | asmlinkage void ev96100_cpu_irq(unsigned int pending, struct pt_regs *regs) | 57 | asmlinkage void ev96100_cpu_irq(unsigned int pending, struct pt_regs *regs) |
58 | { | 58 | { |
59 | do_IRQ(ffz8(pending >> 8), regs); | 59 | do_IRQ(ffz8(pending >> 8), regs); |
60 | } | 60 | } |
61 | 61 | ||
62 | asmlinkage void plat_irq_dispatch(struct pt_regs *regs) | ||
63 | { | ||
64 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; | ||
65 | |||
66 | if (pending & CAUSEF_IP7) | ||
67 | mips_timer_interrupt(regs); | ||
68 | else if (pending) | ||
69 | ev96100_cpu_irq(pending, regs); | ||
70 | else | ||
71 | spurious_interrupt(regs); | ||
72 | } | ||
73 | |||
62 | void __init arch_init_irq(void) | 74 | void __init arch_init_irq(void) |
63 | { | 75 | { |
64 | set_except_vector(0, ev96100IRQ); | ||
65 | mips_cpu_irq_init(0); | 76 | mips_cpu_irq_init(0); |
66 | } | 77 | } |