Commit 56e63689fd866a865682fe14dc5a7e1ec3b2c3ad

Authored by Finn Thain
Committed by Geert Uytterhoeven
1 parent 93edd023a7

m68k/mac: cleanup mac_clear_irq

mac_clear_irq() is dead code and has been dead for as long as I can recall. On certain Mac models, certain irqs can't be cleared this way. Outside of irq dispatch, this code appears be unusable without busy loops or worse, and for irq dispatch we duplicate the same logic. Remove mac_clear_irq() and supporting code.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Showing 5 changed files with 0 additions and 95 deletions Side-by-side Diff

arch/m68k/mac/baboon.c
... ... @@ -124,13 +124,6 @@
124 124 mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
125 125 }
126 126  
127   -void baboon_irq_clear(int irq)
128   -{
129   - int irq_idx = IRQ_IDX(irq);
130   -
131   - baboon->mb_ifr &= ~(1 << irq_idx);
132   -}
133   -
134 127 int baboon_irq_pending(int irq)
135 128 {
136 129 int irq_idx = IRQ_IDX(irq);
arch/m68k/mac/macints.c
... ... @@ -239,7 +239,6 @@
239 239 /*
240 240 * mac_irq_enable - enable an interrupt source
241 241 * mac_irq_disable - disable an interrupt source
242   - * mac_clear_irq - clears a pending interrupt
243 242 * mac_irq_pending - returns the pending status of an IRQ (nonzero = pending)
244 243 *
245 244 * These routines are just dispatchers to the VIA/OSS/PSC routines.
... ... @@ -311,38 +310,6 @@
311 310 case 8:
312 311 if (baboon_present)
313 312 baboon_irq_disable(irq);
314   - break;
315   - }
316   -}
317   -
318   -void mac_clear_irq(unsigned int irq)
319   -{
320   - switch(IRQ_SRC(irq)) {
321   - case 1:
322   - via_irq_clear(irq);
323   - break;
324   - case 2:
325   - case 7:
326   - if (oss_present)
327   - oss_irq_clear(irq);
328   - else
329   - via_irq_clear(irq);
330   - break;
331   - case 3:
332   - case 5:
333   - case 6:
334   - if (psc_present)
335   - psc_irq_clear(irq);
336   - else if (oss_present)
337   - oss_irq_clear(irq);
338   - break;
339   - case 4:
340   - if (psc_present)
341   - psc_irq_clear(irq);
342   - break;
343   - case 8:
344   - if (baboon_present)
345   - baboon_irq_clear(irq);
346 313 break;
347 314 }
348 315 }
... ... @@ -221,37 +221,6 @@
221 221 }
222 222  
223 223 /*
224   - * Clear an OSS interrupt
225   - *
226   - * Not sure if this works or not but it's the only method I could
227   - * think of based on the contents of the mac_oss structure.
228   - */
229   -
230   -void oss_irq_clear(int irq) {
231   - /* FIXME: how to do this on OSS? */
232   - switch(irq) {
233   - case IRQ_MAC_SCC:
234   - oss->irq_pending &= ~OSS_IP_IOPSCC;
235   - break;
236   - case IRQ_MAC_ADB:
237   - oss->irq_pending &= ~OSS_IP_IOPISM;
238   - break;
239   - case IRQ_MAC_SCSI:
240   - oss->irq_pending &= ~OSS_IP_SCSI;
241   - break;
242   - case IRQ_NUBUS_9:
243   - case IRQ_NUBUS_A:
244   - case IRQ_NUBUS_B:
245   - case IRQ_NUBUS_C:
246   - case IRQ_NUBUS_D:
247   - case IRQ_NUBUS_E:
248   - irq -= NUBUS_SOURCE_BASE;
249   - oss->irq_pending &= ~(1 << irq);
250   - break;
251   - }
252   -}
253   -
254   -/*
255 224 * Check to see if a specific OSS interrupt is pending
256 225 */
257 226  
... ... @@ -181,14 +181,6 @@
181 181 psc_write_byte(pIER, 1 << irq_idx);
182 182 }
183 183  
184   -void psc_irq_clear(int irq) {
185   - int irq_src = IRQ_SRC(irq);
186   - int irq_idx = IRQ_IDX(irq);
187   - int pIFR = pIERbase + (irq_src << 4);
188   -
189   - psc_write_byte(pIFR, 1 << irq_idx);
190   -}
191   -
192 184 int psc_irq_pending(int irq)
193 185 {
194 186 int irq_src = IRQ_SRC(irq);
... ... @@ -585,22 +585,6 @@
585 585 }
586 586 }
587 587  
588   -void via_irq_clear(int irq) {
589   - int irq_src = IRQ_SRC(irq);
590   - int irq_idx = IRQ_IDX(irq);
591   - int irq_bit = 1 << irq_idx;
592   -
593   - if (irq_src == 1) {
594   - via1[vIFR] = irq_bit;
595   - } else if (irq_src == 2) {
596   - via2[gIFR] = irq_bit | rbv_clear;
597   - } else if (irq_src == 7) {
598   - /* FIXME: There is no way to clear an individual nubus slot
599   - * IRQ flag, other than getting the device to do it.
600   - */
601   - }
602   -}
603   -
604 588 /*
605 589 * Returns nonzero if an interrupt is pending on the given
606 590 * VIA/IRQ combination.