diff options
Diffstat (limited to 'arch/mips/ite-boards')
-rw-r--r-- | arch/mips/ite-boards/generic/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/ite-boards/generic/int-handler.S | 63 | ||||
-rw-r--r-- | arch/mips/ite-boards/generic/irq.c | 18 | ||||
-rw-r--r-- | arch/mips/ite-boards/generic/time.c | 1 | ||||
-rw-r--r-- | arch/mips/ite-boards/ivr/init.c | 2 | ||||
-rw-r--r-- | arch/mips/ite-boards/qed-4n-s01b/init.c | 2 |
6 files changed, 16 insertions, 72 deletions
diff --git a/arch/mips/ite-boards/generic/Makefile b/arch/mips/ite-boards/generic/Makefile index 0e7853f43983..63431538d0ec 100644 --- a/arch/mips/ite-boards/generic/Makefile +++ b/arch/mips/ite-boards/generic/Makefile | |||
@@ -6,7 +6,7 @@ | |||
6 | # Makefile for the ITE 8172 (qed-4n-s01b) board, generic files. | 6 | # Makefile for the ITE 8172 (qed-4n-s01b) board, generic files. |
7 | # | 7 | # |
8 | 8 | ||
9 | obj-y += it8172_setup.o irq.o int-handler.o pmon_prom.o \ | 9 | obj-y += it8172_setup.o irq.o pmon_prom.o \ |
10 | time.o lpc.o puts.o reset.o | 10 | time.o lpc.o puts.o reset.o |
11 | 11 | ||
12 | obj-$(CONFIG_IT8172_CIR)+= it8172_cir.o | 12 | obj-$(CONFIG_IT8172_CIR)+= it8172_cir.o |
diff --git a/arch/mips/ite-boards/generic/int-handler.S b/arch/mips/ite-boards/generic/int-handler.S deleted file mode 100644 index d190d8add9cb..000000000000 --- a/arch/mips/ite-boards/generic/int-handler.S +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | #include <asm/asm.h> | ||
2 | #include <asm/mipsregs.h> | ||
3 | #include <asm/regdef.h> | ||
4 | #include <asm/stackframe.h> | ||
5 | |||
6 | .text | ||
7 | .set macro | ||
8 | .set noat | ||
9 | .align 5 | ||
10 | |||
11 | NESTED(it8172_IRQ, PT_SIZE, sp) | ||
12 | SAVE_ALL | ||
13 | CLI # Important: mark KERNEL mode ! | ||
14 | |||
15 | /* We're working with 'reorder' set at this point. */ | ||
16 | /* | ||
17 | * Get pending interrupts | ||
18 | */ | ||
19 | |||
20 | mfc0 t0,CP0_CAUSE # get pending interrupts | ||
21 | mfc0 t1,CP0_STATUS # get enabled interrupts | ||
22 | and t0,t1 # isolate allowed ones | ||
23 | |||
24 | andi t0,0xff00 # isolate pending bits | ||
25 | beqz t0, 3f # spurious interrupt | ||
26 | |||
27 | andi a0, t0, CAUSEF_IP7 | ||
28 | beq a0, zero, 1f | ||
29 | |||
30 | li a0, 127 # MIPS_CPU_TIMER_IRQ = (NR_IRQS-1) | ||
31 | move a1, sp | ||
32 | jal ll_timer_interrupt | ||
33 | j ret_from_irq | ||
34 | nop | ||
35 | |||
36 | 1: | ||
37 | andi a0, t0, CAUSEF_IP2 # the only int we expect at this time | ||
38 | beq a0, zero, 3f | ||
39 | move a0,sp | ||
40 | jal it8172_hw0_irqdispatch | ||
41 | |||
42 | mfc0 t0,CP0_STATUS # disable interrupts | ||
43 | ori t0,1 | ||
44 | xori t0,1 | ||
45 | mtc0 t0,CP0_STATUS | ||
46 | nop | ||
47 | nop | ||
48 | nop | ||
49 | |||
50 | la a1, ret_from_irq | ||
51 | jr a1 | ||
52 | nop | ||
53 | |||
54 | 3: | ||
55 | move a0, sp | ||
56 | jal mips_spurious_interrupt | ||
57 | nop | ||
58 | la a1, ret_from_irq | ||
59 | jr a1 | ||
60 | nop | ||
61 | |||
62 | END(it8172_IRQ) | ||
63 | |||
diff --git a/arch/mips/ite-boards/generic/irq.c b/arch/mips/ite-boards/generic/irq.c index e67f96129491..77be7216bdd0 100644 --- a/arch/mips/ite-boards/generic/irq.c +++ b/arch/mips/ite-boards/generic/irq.c | |||
@@ -62,12 +62,8 @@ | |||
62 | 62 | ||
63 | #define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) | 63 | #define ALLINTS_NOTIMER (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4) |
64 | 64 | ||
65 | void disable_it8172_irq(unsigned int irq_nr); | ||
66 | void enable_it8172_irq(unsigned int irq_nr); | ||
67 | |||
68 | extern void set_debug_traps(void); | 65 | extern void set_debug_traps(void); |
69 | extern void mips_timer_interrupt(int irq, struct pt_regs *regs); | 66 | extern void mips_timer_interrupt(int irq, struct pt_regs *regs); |
70 | extern asmlinkage void it8172_IRQ(void); | ||
71 | 67 | ||
72 | struct it8172_intc_regs volatile *it8172_hw0_icregs = | 68 | struct it8172_intc_regs volatile *it8172_hw0_icregs = |
73 | (struct it8172_intc_regs volatile *)(KSEG1ADDR(IT8172_PCI_IO_BASE + IT_INTC_BASE)); | 69 | (struct it8172_intc_regs volatile *)(KSEG1ADDR(IT8172_PCI_IO_BASE + IT_INTC_BASE)); |
@@ -181,8 +177,6 @@ void __init arch_init_irq(void) | |||
181 | int i; | 177 | int i; |
182 | unsigned long flags; | 178 | unsigned long flags; |
183 | 179 | ||
184 | set_except_vector(0, it8172_IRQ); | ||
185 | |||
186 | /* mask all interrupts */ | 180 | /* mask all interrupts */ |
187 | it8172_hw0_icregs->lb_mask = 0xffff; | 181 | it8172_hw0_icregs->lb_mask = 0xffff; |
188 | it8172_hw0_icregs->lpc_mask = 0xffff; | 182 | it8172_hw0_icregs->lpc_mask = 0xffff; |
@@ -282,6 +276,18 @@ void it8172_hw0_irqdispatch(struct pt_regs *regs) | |||
282 | do_IRQ(irq, regs); | 276 | do_IRQ(irq, regs); |
283 | } | 277 | } |
284 | 278 | ||
279 | asmlinkage void plat_irq_dispatch(struct pt_regs *regs) | ||
280 | { | ||
281 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; | ||
282 | |||
283 | if (!pending) | ||
284 | mips_spurious_interrupt(regs); | ||
285 | else if (pending & CAUSEF_IP7) | ||
286 | ll_timer_interrupt(127, regs); | ||
287 | else if (pending & CAUSEF_IP2) | ||
288 | it8172_hw0_irqdispatch(regs); | ||
289 | } | ||
290 | |||
285 | void show_pending_irqs(void) | 291 | void show_pending_irqs(void) |
286 | { | 292 | { |
287 | fputs("intstatus: "); | 293 | fputs("intstatus: "); |
diff --git a/arch/mips/ite-boards/generic/time.c b/arch/mips/ite-boards/generic/time.c index b79817bb6cce..dee497a91807 100644 --- a/arch/mips/ite-boards/generic/time.c +++ b/arch/mips/ite-boards/generic/time.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/time.h> | 30 | #include <linux/time.h> |
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/mc146818rtc.h> | ||
32 | 33 | ||
33 | #include <asm/time.h> | 34 | #include <asm/time.h> |
34 | #include <asm/mipsregs.h> | 35 | #include <asm/mipsregs.h> |
diff --git a/arch/mips/ite-boards/ivr/init.c b/arch/mips/ite-boards/ivr/init.c index b774db035b31..05cf9218c432 100644 --- a/arch/mips/ite-boards/ivr/init.c +++ b/arch/mips/ite-boards/ivr/init.c | |||
@@ -34,13 +34,13 @@ | |||
34 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <asm/sections.h> | ||
37 | #include <asm/it8172/it8172.h> | 38 | #include <asm/it8172/it8172.h> |
38 | #include <asm/it8172/it8172_dbg.h> | 39 | #include <asm/it8172/it8172_dbg.h> |
39 | 40 | ||
40 | int prom_argc; | 41 | int prom_argc; |
41 | char **prom_argv, **prom_envp; | 42 | char **prom_argv, **prom_envp; |
42 | 43 | ||
43 | extern char _end; | ||
44 | extern void __init prom_init_cmdline(void); | 44 | extern void __init prom_init_cmdline(void); |
45 | extern unsigned long __init prom_get_memsize(void); | 45 | extern unsigned long __init prom_get_memsize(void); |
46 | extern void __init it8172_init_ram_resource(unsigned long memsize); | 46 | extern void __init it8172_init_ram_resource(unsigned long memsize); |
diff --git a/arch/mips/ite-boards/qed-4n-s01b/init.c b/arch/mips/ite-boards/qed-4n-s01b/init.c index e8ec8be66a80..ea2a754cafe5 100644 --- a/arch/mips/ite-boards/qed-4n-s01b/init.c +++ b/arch/mips/ite-boards/qed-4n-s01b/init.c | |||
@@ -34,13 +34,13 @@ | |||
34 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <asm/sections.h> | ||
37 | #include <asm/it8172/it8172.h> | 38 | #include <asm/it8172/it8172.h> |
38 | #include <asm/it8172/it8172_dbg.h> | 39 | #include <asm/it8172/it8172_dbg.h> |
39 | 40 | ||
40 | int prom_argc; | 41 | int prom_argc; |
41 | char **prom_argv, **prom_envp; | 42 | char **prom_argv, **prom_envp; |
42 | 43 | ||
43 | extern char _end; | ||
44 | extern void __init prom_init_cmdline(void); | 44 | extern void __init prom_init_cmdline(void); |
45 | extern unsigned long __init prom_get_memsize(void); | 45 | extern unsigned long __init prom_get_memsize(void); |
46 | extern void __init it8172_init_ram_resource(unsigned long memsize); | 46 | extern void __init it8172_init_ram_resource(unsigned long memsize); |