diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-09-11 05:28:04 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-11-08 16:35:52 -0500 |
commit | d890d73995257b4e10cdd7d55bad80e34a71ba22 (patch) | |
tree | 3e4ee85a2d8d126e1570c7ea47178a2a8a627849 /arch/m68k/mac | |
parent | a03010ed9b399fdbc28ac8836e0a6d4b15403f9f (diff) |
m68k/irq: Remove obsolete m68k irq framework
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r-- | arch/m68k/mac/baboon.c | 41 | ||||
-rw-r--r-- | arch/m68k/mac/oss.c | 78 | ||||
-rw-r--r-- | arch/m68k/mac/psc.c | 44 | ||||
-rw-r--r-- | arch/m68k/mac/via.c | 104 |
4 files changed, 0 insertions, 267 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 425144cbfa7d..b55ead284971 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c | |||
@@ -11,9 +11,7 @@ | |||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
15 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
16 | #endif | ||
17 | 15 | ||
18 | #include <asm/traps.h> | 16 | #include <asm/traps.h> |
19 | #include <asm/bootinfo.h> | 17 | #include <asm/bootinfo.h> |
@@ -56,7 +54,6 @@ void __init baboon_init(void) | |||
56 | * Baboon interrupt handler. This works a lot like a VIA. | 54 | * Baboon interrupt handler. This works a lot like a VIA. |
57 | */ | 55 | */ |
58 | 56 | ||
59 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
60 | static void baboon_irq(unsigned int irq, struct irq_desc *desc) | 57 | static void baboon_irq(unsigned int irq, struct irq_desc *desc) |
61 | { | 58 | { |
62 | int irq_bit, irq_num; | 59 | int irq_bit, irq_num; |
@@ -88,39 +85,6 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc) | |||
88 | baboon->mb_ifr &= ~events; | 85 | baboon->mb_ifr &= ~events; |
89 | #endif | 86 | #endif |
90 | } | 87 | } |
91 | #else | ||
92 | static irqreturn_t baboon_irq(int irq, void *dev_id) | ||
93 | { | ||
94 | int irq_bit, irq_num; | ||
95 | unsigned char events; | ||
96 | |||
97 | #ifdef DEBUG_IRQS | ||
98 | printk("baboon_irq: mb_control %02X mb_ifr %02X mb_status %02X\n", | ||
99 | (uint) baboon->mb_control, (uint) baboon->mb_ifr, | ||
100 | (uint) baboon->mb_status); | ||
101 | #endif | ||
102 | |||
103 | if (!(events = baboon->mb_ifr & 0x07)) | ||
104 | return IRQ_NONE; | ||
105 | |||
106 | irq_num = IRQ_BABOON_0; | ||
107 | irq_bit = 1; | ||
108 | do { | ||
109 | if (events & irq_bit) { | ||
110 | baboon->mb_ifr &= ~irq_bit; | ||
111 | generic_handle_irq(irq_num); | ||
112 | } | ||
113 | irq_bit <<= 1; | ||
114 | irq_num++; | ||
115 | } while(events >= irq_bit); | ||
116 | #if 0 | ||
117 | if (baboon->mb_ifr & 0x02) macide_ack_intr(NULL); | ||
118 | /* for now we need to smash all interrupts */ | ||
119 | baboon->mb_ifr &= ~events; | ||
120 | #endif | ||
121 | return IRQ_HANDLED; | ||
122 | } | ||
123 | #endif | ||
124 | 88 | ||
125 | /* | 89 | /* |
126 | * Register the Baboon interrupt dispatcher on nubus slot $C. | 90 | * Register the Baboon interrupt dispatcher on nubus slot $C. |
@@ -129,12 +93,7 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) | |||
129 | void __init baboon_register_interrupts(void) | 93 | void __init baboon_register_interrupts(void) |
130 | { | 94 | { |
131 | baboon_disabled = 0; | 95 | baboon_disabled = 0; |
132 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
133 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); | 96 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); |
134 | #else | ||
135 | if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon)) | ||
136 | pr_err("Couldn't register baboon interrupt\n"); | ||
137 | #endif | ||
138 | } | 97 | } |
139 | 98 | ||
140 | /* | 99 | /* |
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index cc784c2ff6e8..a4c82dab9ff1 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
@@ -19,9 +19,7 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
23 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
24 | #endif | ||
25 | 23 | ||
26 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
27 | #include <asm/macintosh.h> | 25 | #include <asm/macintosh.h> |
@@ -32,11 +30,7 @@ | |||
32 | int oss_present; | 30 | int oss_present; |
33 | volatile struct mac_oss *oss; | 31 | volatile struct mac_oss *oss; |
34 | 32 | ||
35 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
36 | extern void via1_irq(unsigned int irq, struct irq_desc *desc); | 33 | extern void via1_irq(unsigned int irq, struct irq_desc *desc); |
37 | #else | ||
38 | extern irqreturn_t via1_irq(int, void *); | ||
39 | #endif | ||
40 | 34 | ||
41 | /* | 35 | /* |
42 | * Initialize the OSS | 36 | * Initialize the OSS |
@@ -76,7 +70,6 @@ void __init oss_nubus_init(void) | |||
76 | * and SCSI; everything else is routed to its own autovector IRQ. | 70 | * and SCSI; everything else is routed to its own autovector IRQ. |
77 | */ | 71 | */ |
78 | 72 | ||
79 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
80 | static void oss_irq(unsigned int irq, struct irq_desc *desc) | 73 | static void oss_irq(unsigned int irq, struct irq_desc *desc) |
81 | { | 74 | { |
82 | int events; | 75 | int events; |
@@ -103,35 +96,6 @@ static void oss_irq(unsigned int irq, struct irq_desc *desc) | |||
103 | /* FIXME: error check here? */ | 96 | /* FIXME: error check here? */ |
104 | } | 97 | } |
105 | } | 98 | } |
106 | #else | ||
107 | static irqreturn_t oss_irq(int irq, void *dev_id) | ||
108 | { | ||
109 | int events; | ||
110 | |||
111 | events = oss->irq_pending & (OSS_IP_SOUND|OSS_IP_SCSI); | ||
112 | if (!events) | ||
113 | return IRQ_NONE; | ||
114 | |||
115 | #ifdef DEBUG_IRQS | ||
116 | if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) { | ||
117 | printk("oss_irq: irq %d events = 0x%04X\n", irq, | ||
118 | (int) oss->irq_pending); | ||
119 | } | ||
120 | #endif | ||
121 | /* FIXME: how do you clear a pending IRQ? */ | ||
122 | |||
123 | if (events & OSS_IP_SOUND) { | ||
124 | oss->irq_pending &= ~OSS_IP_SOUND; | ||
125 | /* FIXME: call sound handler */ | ||
126 | } else if (events & OSS_IP_SCSI) { | ||
127 | oss->irq_pending &= ~OSS_IP_SCSI; | ||
128 | generic_handle_irq(IRQ_MAC_SCSI); | ||
129 | } else { | ||
130 | /* FIXME: error check here? */ | ||
131 | } | ||
132 | return IRQ_HANDLED; | ||
133 | } | ||
134 | #endif | ||
135 | 99 | ||
136 | /* | 100 | /* |
137 | * Nubus IRQ handler, OSS style | 101 | * Nubus IRQ handler, OSS style |
@@ -139,7 +103,6 @@ static irqreturn_t oss_irq(int irq, void *dev_id) | |||
139 | * Unlike the VIA/RBV this is on its own autovector interrupt level. | 103 | * Unlike the VIA/RBV this is on its own autovector interrupt level. |
140 | */ | 104 | */ |
141 | 105 | ||
142 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
143 | static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) | 106 | static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) |
144 | { | 107 | { |
145 | int events, irq_bit, i; | 108 | int events, irq_bit, i; |
@@ -166,35 +129,6 @@ static void oss_nubus_irq(unsigned int irq, struct irq_desc *desc) | |||
166 | } | 129 | } |
167 | } while(events & (irq_bit - 1)); | 130 | } while(events & (irq_bit - 1)); |
168 | } | 131 | } |
169 | #else | ||
170 | static irqreturn_t oss_nubus_irq(int irq, void *dev_id) | ||
171 | { | ||
172 | int events, irq_bit, i; | ||
173 | |||
174 | events = oss->irq_pending & OSS_IP_NUBUS; | ||
175 | if (!events) | ||
176 | return IRQ_NONE; | ||
177 | |||
178 | #ifdef DEBUG_NUBUS_INT | ||
179 | if (console_loglevel > 7) { | ||
180 | printk("oss_nubus_irq: events = 0x%04X\n", events); | ||
181 | } | ||
182 | #endif | ||
183 | /* There are only six slots on the OSS, not seven */ | ||
184 | |||
185 | i = 6; | ||
186 | irq_bit = 0x40; | ||
187 | do { | ||
188 | --i; | ||
189 | irq_bit >>= 1; | ||
190 | if (events & irq_bit) { | ||
191 | oss->irq_pending &= ~irq_bit; | ||
192 | generic_handle_irq(NUBUS_SOURCE_BASE + i); | ||
193 | } | ||
194 | } while(events & (irq_bit - 1)); | ||
195 | return IRQ_HANDLED; | ||
196 | } | ||
197 | #endif | ||
198 | 132 | ||
199 | /* | 133 | /* |
200 | * Register the OSS and NuBus interrupt dispatchers. | 134 | * Register the OSS and NuBus interrupt dispatchers. |
@@ -202,22 +136,10 @@ static irqreturn_t oss_nubus_irq(int irq, void *dev_id) | |||
202 | 136 | ||
203 | void __init oss_register_interrupts(void) | 137 | void __init oss_register_interrupts(void) |
204 | { | 138 | { |
205 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
206 | irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq); | 139 | irq_set_chained_handler(OSS_IRQLEV_SCSI, oss_irq); |
207 | irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq); | 140 | irq_set_chained_handler(OSS_IRQLEV_NUBUS, oss_nubus_irq); |
208 | irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq); | 141 | irq_set_chained_handler(OSS_IRQLEV_SOUND, oss_irq); |
209 | irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq); | 142 | irq_set_chained_handler(OSS_IRQLEV_VIA1, via1_irq); |
210 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
211 | if (request_irq(OSS_IRQLEV_SCSI, oss_irq, 0, "scsi", (void *)oss)) | ||
212 | pr_err("Couldn't register %s interrupt\n", "scsi"); | ||
213 | if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, 0, "nubus", | ||
214 | (void *)oss)) | ||
215 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
216 | if (request_irq(OSS_IRQLEV_SOUND, oss_irq, 0, "sound", (void *)oss)) | ||
217 | pr_err("Couldn't register %s interrupt\n", "sound"); | ||
218 | if (request_irq(OSS_IRQLEV_VIA1, via1_irq, 0, "via1", (void *)via1)) | ||
219 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
220 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
221 | } | 143 | } |
222 | 144 | ||
223 | /* | 145 | /* |
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index 52840b8c03b8..e6c2d20f328d 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c | |||
@@ -18,9 +18,7 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
22 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
23 | #endif | ||
24 | 22 | ||
25 | #include <asm/traps.h> | 23 | #include <asm/traps.h> |
26 | #include <asm/bootinfo.h> | 24 | #include <asm/bootinfo.h> |
@@ -116,7 +114,6 @@ void __init psc_init(void) | |||
116 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. | 114 | * PSC interrupt handler. It's a lot like the VIA interrupt handler. |
117 | */ | 115 | */ |
118 | 116 | ||
119 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
120 | static void psc_irq(unsigned int irq, struct irq_desc *desc) | 117 | static void psc_irq(unsigned int irq, struct irq_desc *desc) |
121 | { | 118 | { |
122 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); | 119 | unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc); |
@@ -145,36 +142,6 @@ static void psc_irq(unsigned int irq, struct irq_desc *desc) | |||
145 | irq_bit <<= 1; | 142 | irq_bit <<= 1; |
146 | } while (events >= irq_bit); | 143 | } while (events >= irq_bit); |
147 | } | 144 | } |
148 | #else | ||
149 | static irqreturn_t psc_irq(int irq, void *dev_id) | ||
150 | { | ||
151 | int pIFR = pIFRbase + ((int) dev_id); | ||
152 | int pIER = pIERbase + ((int) dev_id); | ||
153 | int irq_num; | ||
154 | unsigned char irq_bit, events; | ||
155 | |||
156 | #ifdef DEBUG_IRQS | ||
157 | printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n", | ||
158 | irq, (int) psc_read_byte(pIFR), (int) psc_read_byte(pIER)); | ||
159 | #endif | ||
160 | |||
161 | events = psc_read_byte(pIFR) & psc_read_byte(pIER) & 0xF; | ||
162 | if (!events) | ||
163 | return IRQ_NONE; | ||
164 | |||
165 | irq_num = irq << 3; | ||
166 | irq_bit = 1; | ||
167 | do { | ||
168 | if (events & irq_bit) { | ||
169 | psc_write_byte(pIFR, irq_bit); | ||
170 | generic_handle_irq(irq_num); | ||
171 | } | ||
172 | irq_num++; | ||
173 | irq_bit <<= 1; | ||
174 | } while (events >= irq_bit); | ||
175 | return IRQ_HANDLED; | ||
176 | } | ||
177 | #endif | ||
178 | 145 | ||
179 | /* | 146 | /* |
180 | * Register the PSC interrupt dispatchers for autovector interrupts 3-6. | 147 | * Register the PSC interrupt dispatchers for autovector interrupts 3-6. |
@@ -182,7 +149,6 @@ static irqreturn_t psc_irq(int irq, void *dev_id) | |||
182 | 149 | ||
183 | void __init psc_register_interrupts(void) | 150 | void __init psc_register_interrupts(void) |
184 | { | 151 | { |
185 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
186 | irq_set_chained_handler(IRQ_AUTO_3, psc_irq); | 152 | irq_set_chained_handler(IRQ_AUTO_3, psc_irq); |
187 | irq_set_handler_data(IRQ_AUTO_3, (void *)0x30); | 153 | irq_set_handler_data(IRQ_AUTO_3, (void *)0x30); |
188 | irq_set_chained_handler(IRQ_AUTO_4, psc_irq); | 154 | irq_set_chained_handler(IRQ_AUTO_4, psc_irq); |
@@ -191,16 +157,6 @@ void __init psc_register_interrupts(void) | |||
191 | irq_set_handler_data(IRQ_AUTO_5, (void *)0x50); | 157 | irq_set_handler_data(IRQ_AUTO_5, (void *)0x50); |
192 | irq_set_chained_handler(IRQ_AUTO_6, psc_irq); | 158 | irq_set_chained_handler(IRQ_AUTO_6, psc_irq); |
193 | irq_set_handler_data(IRQ_AUTO_6, (void *)0x60); | 159 | irq_set_handler_data(IRQ_AUTO_6, (void *)0x60); |
194 | #else /* !CONFIG_GENERIC_HARDIRQS */ | ||
195 | if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30)) | ||
196 | pr_err("Couldn't register psc%d interrupt\n", 3); | ||
197 | if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40)) | ||
198 | pr_err("Couldn't register psc%d interrupt\n", 4); | ||
199 | if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50)) | ||
200 | pr_err("Couldn't register psc%d interrupt\n", 5); | ||
201 | if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60)) | ||
202 | pr_err("Couldn't register psc%d interrupt\n", 6); | ||
203 | #endif /* !CONFIG_GENERIC_HARDIRQS */ | ||
204 | } | 160 | } |
205 | 161 | ||
206 | void psc_irq_enable(int irq) { | 162 | void psc_irq_enable(int irq) { |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index b8156ac496a0..f1600ad26621 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -28,9 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
32 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
33 | #endif | ||
34 | 32 | ||
35 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
36 | #include <asm/macintosh.h> | 34 | #include <asm/macintosh.h> |
@@ -417,7 +415,6 @@ void __init via_nubus_init(void) | |||
417 | * via6522.c :-), disable/pending masks added. | 415 | * via6522.c :-), disable/pending masks added. |
418 | */ | 416 | */ |
419 | 417 | ||
420 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
421 | void via1_irq(unsigned int irq, struct irq_desc *desc) | 418 | void via1_irq(unsigned int irq, struct irq_desc *desc) |
422 | { | 419 | { |
423 | int irq_num; | 420 | int irq_num; |
@@ -459,58 +456,12 @@ static void via2_irq(unsigned int irq, struct irq_desc *desc) | |||
459 | irq_bit <<= 1; | 456 | irq_bit <<= 1; |
460 | } while (events >= irq_bit); | 457 | } while (events >= irq_bit); |
461 | } | 458 | } |
462 | #else | ||
463 | irqreturn_t via1_irq(int irq, void *dev_id) | ||
464 | { | ||
465 | int irq_num; | ||
466 | unsigned char irq_bit, events; | ||
467 | |||
468 | events = via1[vIFR] & via1[vIER] & 0x7F; | ||
469 | if (!events) | ||
470 | return IRQ_NONE; | ||
471 | |||
472 | irq_num = VIA1_SOURCE_BASE; | ||
473 | irq_bit = 1; | ||
474 | do { | ||
475 | if (events & irq_bit) { | ||
476 | via1[vIFR] = irq_bit; | ||
477 | generic_handle_irq(irq_num); | ||
478 | } | ||
479 | ++irq_num; | ||
480 | irq_bit <<= 1; | ||
481 | } while (events >= irq_bit); | ||
482 | return IRQ_HANDLED; | ||
483 | } | ||
484 | |||
485 | irqreturn_t via2_irq(int irq, void *dev_id) | ||
486 | { | ||
487 | int irq_num; | ||
488 | unsigned char irq_bit, events; | ||
489 | |||
490 | events = via2[gIFR] & via2[gIER] & 0x7F; | ||
491 | if (!events) | ||
492 | return IRQ_NONE; | ||
493 | |||
494 | irq_num = VIA2_SOURCE_BASE; | ||
495 | irq_bit = 1; | ||
496 | do { | ||
497 | if (events & irq_bit) { | ||
498 | via2[gIFR] = irq_bit | rbv_clear; | ||
499 | generic_handle_irq(irq_num); | ||
500 | } | ||
501 | ++irq_num; | ||
502 | irq_bit <<= 1; | ||
503 | } while (events >= irq_bit); | ||
504 | return IRQ_HANDLED; | ||
505 | } | ||
506 | #endif | ||
507 | 459 | ||
508 | /* | 460 | /* |
509 | * Dispatch Nubus interrupts. We are called as a secondary dispatch by the | 461 | * Dispatch Nubus interrupts. We are called as a secondary dispatch by the |
510 | * VIA2 dispatcher as a fast interrupt handler. | 462 | * VIA2 dispatcher as a fast interrupt handler. |
511 | */ | 463 | */ |
512 | 464 | ||
513 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
514 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | 465 | void via_nubus_irq(unsigned int irq, struct irq_desc *desc) |
515 | { | 466 | { |
516 | int slot_irq; | 467 | int slot_irq; |
@@ -545,43 +496,6 @@ void via_nubus_irq(unsigned int irq, struct irq_desc *desc) | |||
545 | events &= ~via2[vDirA]; | 496 | events &= ~via2[vDirA]; |
546 | } while (events); | 497 | } while (events); |
547 | } | 498 | } |
548 | #else | ||
549 | irqreturn_t via_nubus_irq(int irq, void *dev_id) | ||
550 | { | ||
551 | int slot_irq; | ||
552 | unsigned char slot_bit, events; | ||
553 | |||
554 | events = ~via2[gBufA] & 0x7F; | ||
555 | if (rbv_present) | ||
556 | events &= via2[rSIER]; | ||
557 | else | ||
558 | events &= ~via2[vDirA]; | ||
559 | if (!events) | ||
560 | return IRQ_NONE; | ||
561 | |||
562 | do { | ||
563 | slot_irq = IRQ_NUBUS_F; | ||
564 | slot_bit = 0x40; | ||
565 | do { | ||
566 | if (events & slot_bit) { | ||
567 | events &= ~slot_bit; | ||
568 | generic_handle_irq(slot_irq); | ||
569 | } | ||
570 | --slot_irq; | ||
571 | slot_bit >>= 1; | ||
572 | } while (events); | ||
573 | |||
574 | /* clear the CA1 interrupt and make certain there's no more. */ | ||
575 | via2[gIFR] = 0x02 | rbv_clear; | ||
576 | events = ~via2[gBufA] & 0x7F; | ||
577 | if (rbv_present) | ||
578 | events &= via2[rSIER]; | ||
579 | else | ||
580 | events &= ~via2[vDirA]; | ||
581 | } while (events); | ||
582 | return IRQ_HANDLED; | ||
583 | } | ||
584 | #endif | ||
585 | 499 | ||
586 | /* | 500 | /* |
587 | * Register the interrupt dispatchers for VIA or RBV machines only. | 501 | * Register the interrupt dispatchers for VIA or RBV machines only. |
@@ -589,7 +503,6 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id) | |||
589 | 503 | ||
590 | void __init via_register_interrupts(void) | 504 | void __init via_register_interrupts(void) |
591 | { | 505 | { |
592 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
593 | if (via_alt_mapping) { | 506 | if (via_alt_mapping) { |
594 | /* software interrupt */ | 507 | /* software interrupt */ |
595 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); | 508 | irq_set_chained_handler(IRQ_AUTO_1, via1_irq); |
@@ -600,23 +513,6 @@ void __init via_register_interrupts(void) | |||
600 | } | 513 | } |
601 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); | 514 | irq_set_chained_handler(IRQ_AUTO_2, via2_irq); |
602 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); | 515 | irq_set_chained_handler(IRQ_MAC_NUBUS, via_nubus_irq); |
603 | #else | ||
604 | if (via_alt_mapping) { | ||
605 | if (request_irq(IRQ_AUTO_1, via1_irq, 0, "software", | ||
606 | (void *)via1)) | ||
607 | pr_err("Couldn't register %s interrupt\n", "software"); | ||
608 | if (request_irq(IRQ_AUTO_6, via1_irq, 0, "via1", (void *)via1)) | ||
609 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
610 | } else { | ||
611 | if (request_irq(IRQ_AUTO_1, via1_irq, 0, "via1", (void *)via1)) | ||
612 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
613 | } | ||
614 | if (request_irq(IRQ_AUTO_2, via2_irq, 0, "via2", (void *)via2)) | ||
615 | pr_err("Couldn't register %s interrupt\n", "via2"); | ||
616 | if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, 0, "nubus", | ||
617 | (void *)via2)) | ||
618 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
619 | #endif | ||
620 | } | 516 | } |
621 | 517 | ||
622 | void via_irq_enable(int irq) { | 518 | void via_irq_enable(int irq) { |