diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/lasat/interrupt.c | 22 | ||||
-rw-r--r-- | arch/mips/pci/pci-lasat.c | 32 |
2 files changed, 31 insertions, 23 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 | } |