diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2007-11-09 04:42:35 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-11-15 18:21:50 -0500 |
commit | 89becf5c0d9019f4f9300840f08a98ee33d57d37 (patch) | |
tree | 8b6a9295e957de54fdad6866c1437f3d48b12be0 | |
parent | fcee3faf8339bb65660c9a22123f71aa0cc30514 (diff) |
[MIPS] Lasat: Fix overlap of interrupt number ranges.
The range of MIPS_CPU IRQ and the range of LASAT IRQ overlap.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/lasat/interrupt.c | 22 | ||||
-rw-r--r-- | arch/mips/pci/pci-lasat.c | 32 | ||||
-rw-r--r-- | include/asm-mips/lasat/lasatint.h | 5 | ||||
-rw-r--r-- | include/asm-mips/mach-lasat/irq.h | 13 |
4 files changed, 44 insertions, 28 deletions
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c index ba9692be3564..cfeab669782f 100644 --- a/arch/mips/lasat/interrupt.c +++ b/arch/mips/lasat/interrupt.c | |||
@@ -19,17 +19,14 @@ | |||
19 | * Lasat boards. | 19 | * Lasat boards. |
20 | */ | 20 | */ |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/irq.h> | ||
23 | #include <linux/sched.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
26 | #include <linux/kernel_stat.h> | 23 | #include <linux/irq.h> |
27 | 24 | ||
28 | #include <asm/bootinfo.h> | 25 | #include <asm/bootinfo.h> |
29 | #include <asm/irq_cpu.h> | 26 | #include <asm/irq_cpu.h> |
30 | #include <asm/lasat/lasatint.h> | 27 | #include <asm/lasat/lasatint.h> |
31 | #include <asm/time.h> | 28 | |
32 | #include <asm/gdb-stub.h> | 29 | #include <irq.h> |
33 | 30 | ||
34 | static volatile int *lasat_int_status; | 31 | static volatile int *lasat_int_status; |
35 | static volatile int *lasat_int_mask; | 32 | static volatile int *lasat_int_mask; |
@@ -97,12 +94,18 @@ asmlinkage void plat_irq_dispatch(void) | |||
97 | 94 | ||
98 | /* if int_status == 0, then the interrupt has already been cleared */ | 95 | /* if int_status == 0, then the interrupt has already been cleared */ |
99 | if (int_status) { | 96 | if (int_status) { |
100 | irq = LASATINT_BASE + ls1bit32(int_status); | 97 | irq = LASAT_IRQ_BASE + ls1bit32(int_status); |
101 | 98 | ||
102 | do_IRQ(irq); | 99 | do_IRQ(irq); |
103 | } | 100 | } |
104 | } | 101 | } |
105 | 102 | ||
103 | static struct irqaction cascade = { | ||
104 | .handler = no_action, | ||
105 | .mask = CPU_MASK_NONE, | ||
106 | .name = "cascade", | ||
107 | }; | ||
108 | |||
106 | void __init arch_init_irq(void) | 109 | void __init arch_init_irq(void) |
107 | { | 110 | { |
108 | int i; | 111 | int i; |
@@ -127,6 +130,9 @@ void __init arch_init_irq(void) | |||
127 | } | 130 | } |
128 | 131 | ||
129 | mips_cpu_irq_init(); | 132 | mips_cpu_irq_init(); |
130 | for (i = LASATINT_BASE; i <= LASATINT_END; i++) | 133 | |
134 | for (i = LASAT_IRQ_BASE; i <= LASAT_IRQ_END; i++) | ||
131 | set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq); | 135 | set_irq_chip_and_handler(i, &lasat_irq_type, handle_level_irq); |
136 | |||
137 | setup_irq(LASAT_CASCADE_IRQ, &cascade); | ||
132 | } | 138 | } |
diff --git a/arch/mips/pci/pci-lasat.c b/arch/mips/pci/pci-lasat.c index 174f314933b5..e70ae3236e0b 100644 --- a/arch/mips/pci/pci-lasat.c +++ b/arch/mips/pci/pci-lasat.c | |||
@@ -5,12 +5,14 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2000, 2001, 04 Keith M Wesolowski | 6 | * Copyright (C) 2000, 2001, 04 Keith M Wesolowski |
7 | */ | 7 | */ |
8 | #include <linux/kernel.h> | ||
9 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/kernel.h> | ||
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | |||
12 | #include <asm/bootinfo.h> | 13 | #include <asm/bootinfo.h> |
13 | #include <asm/lasat/lasatint.h> | 14 | |
15 | #include <irq.h> | ||
14 | 16 | ||
15 | extern struct pci_ops nile4_pci_ops; | 17 | extern struct pci_ops nile4_pci_ops; |
16 | extern struct pci_ops gt64xxx_pci0_ops; | 18 | extern struct pci_ops gt64xxx_pci0_ops; |
@@ -55,15 +57,15 @@ static int __init lasat_pci_setup(void) | |||
55 | 57 | ||
56 | arch_initcall(lasat_pci_setup); | 58 | arch_initcall(lasat_pci_setup); |
57 | 59 | ||
58 | #define LASATINT_ETH1 (LASATINT_BASE + 0) | 60 | #define LASAT_IRQ_ETH1 (LASAT_IRQ_BASE + 0) |
59 | #define LASATINT_ETH0 (LASATINT_BASE + 1) | 61 | #define LASAT_IRQ_ETH0 (LASAT_IRQ_BASE + 1) |
60 | #define LASATINT_HDC (LASATINT_BASE + 2) | 62 | #define LASAT_IRQ_HDC (LASAT_IRQ_BASE + 2) |
61 | #define LASATINT_COMP (LASATINT_BASE + 3) | 63 | #define LASAT_IRQ_COMP (LASAT_IRQ_BASE + 3) |
62 | #define LASATINT_HDLC (LASATINT_BASE + 4) | 64 | #define LASAT_IRQ_HDLC (LASAT_IRQ_BASE + 4) |
63 | #define LASATINT_PCIA (LASATINT_BASE + 5) | 65 | #define LASAT_IRQ_PCIA (LASAT_IRQ_BASE + 5) |
64 | #define LASATINT_PCIB (LASATINT_BASE + 6) | 66 | #define LASAT_IRQ_PCIB (LASAT_IRQ_BASE + 6) |
65 | #define LASATINT_PCIC (LASATINT_BASE + 7) | 67 | #define LASAT_IRQ_PCIC (LASAT_IRQ_BASE + 7) |
66 | #define LASATINT_PCID (LASATINT_BASE + 8) | 68 | #define LASAT_IRQ_PCID (LASAT_IRQ_BASE + 8) |
67 | 69 | ||
68 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 70 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
69 | { | 71 | { |
@@ -71,13 +73,13 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
71 | case 1: | 73 | case 1: |
72 | case 2: | 74 | case 2: |
73 | case 3: | 75 | case 3: |
74 | return LASATINT_PCIA + (((slot-1) + (pin-1)) % 4); | 76 | return LASAT_IRQ_PCIA + (((slot-1) + (pin-1)) % 4); |
75 | case 4: | 77 | case 4: |
76 | return LASATINT_ETH1; /* Ethernet 1 (LAN 2) */ | 78 | return LASAT_IRQ_ETH1; /* Ethernet 1 (LAN 2) */ |
77 | case 5: | 79 | case 5: |
78 | return LASATINT_ETH0; /* Ethernet 0 (LAN 1) */ | 80 | return LASAT_IRQ_ETH0; /* Ethernet 0 (LAN 1) */ |
79 | case 6: | 81 | case 6: |
80 | return LASATINT_HDC; /* IDE controller */ | 82 | return LASAT_IRQ_HDC; /* IDE controller */ |
81 | default: | 83 | default: |
82 | return 0xff; /* Illegal */ | 84 | return 0xff; /* Illegal */ |
83 | } | 85 | } |
diff --git a/include/asm-mips/lasat/lasatint.h b/include/asm-mips/lasat/lasatint.h index 581dc45685a2..e0d2458b43d0 100644 --- a/include/asm-mips/lasat/lasatint.h +++ b/include/asm-mips/lasat/lasatint.h | |||
@@ -1,11 +1,6 @@ | |||
1 | #ifndef __ASM_LASAT_LASATINT_H | 1 | #ifndef __ASM_LASAT_LASATINT_H |
2 | #define __ASM_LASAT_LASATINT_H | 2 | #define __ASM_LASAT_LASATINT_H |
3 | 3 | ||
4 | #include <linux/irq.h> | ||
5 | |||
6 | #define LASATINT_BASE MIPS_CPU_IRQ_BASE | ||
7 | #define LASATINT_END (LASATINT_BASE + 16) | ||
8 | |||
9 | /* lasat 100 */ | 4 | /* lasat 100 */ |
10 | #define LASAT_INT_STATUS_REG_100 (KSEG1ADDR(0x1c880000)) | 5 | #define LASAT_INT_STATUS_REG_100 (KSEG1ADDR(0x1c880000)) |
11 | #define LASAT_INT_MASK_REG_100 (KSEG1ADDR(0x1c890000)) | 6 | #define LASAT_INT_MASK_REG_100 (KSEG1ADDR(0x1c890000)) |
diff --git a/include/asm-mips/mach-lasat/irq.h b/include/asm-mips/mach-lasat/irq.h new file mode 100644 index 000000000000..da75f89f3723 --- /dev/null +++ b/include/asm-mips/mach-lasat/irq.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _ASM_MACH_LASAT_IRQ_H | ||
2 | #define _ASM_MACH_LASAT_IRQ_H | ||
3 | |||
4 | #define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 0) | ||
5 | |||
6 | #define LASAT_IRQ_BASE 8 | ||
7 | #define LASAT_IRQ_END 23 | ||
8 | |||
9 | #define NR_IRQS 24 | ||
10 | |||
11 | #include_next <irq.h> | ||
12 | |||
13 | #endif /* _ASM_MACH_LASAT_IRQ_H */ | ||