diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2011-10-23 10:11:14 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-12-10 13:52:46 -0500 |
commit | 30c0527d15ce4edcde64581e9d062ba9fb08fe16 (patch) | |
tree | da3e996d43a671d2d66075fdc7676f17c688b415 /arch/m68k/mac/via.c | |
parent | 56e63689fd866a865682fe14dc5a7e1ec3b2c3ad (diff) |
m68k/mac: cleanup mac_irq_pending
mac_irq_pending() has only one caller (mac_esp.c). Nothing tests for Baboon, PSC or OSS pending interrupts. Until that need arises, let's keep it simple and remove all the unused abstraction. Replace it with a routine to check for SCSI DRQ.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac/via.c')
-rw-r--r-- | arch/m68k/mac/via.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 1c2bce7506b2..105707aa03a2 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -585,28 +585,6 @@ void via_irq_disable(int irq) { | |||
585 | } | 585 | } |
586 | } | 586 | } |
587 | 587 | ||
588 | /* | ||
589 | * Returns nonzero if an interrupt is pending on the given | ||
590 | * VIA/IRQ combination. | ||
591 | */ | ||
592 | |||
593 | int via_irq_pending(int irq) | ||
594 | { | ||
595 | int irq_src = IRQ_SRC(irq); | ||
596 | int irq_idx = IRQ_IDX(irq); | ||
597 | int irq_bit = 1 << irq_idx; | ||
598 | |||
599 | if (irq_src == 1) { | ||
600 | return via1[vIFR] & irq_bit; | ||
601 | } else if (irq_src == 2) { | ||
602 | return via2[gIFR] & irq_bit; | ||
603 | } else if (irq_src == 7) { | ||
604 | /* Always 0 for MAC_VIA_QUADRA if the slot irq is disabled. */ | ||
605 | return ~via2[gBufA] & irq_bit; | ||
606 | } | ||
607 | return 0; | ||
608 | } | ||
609 | |||
610 | void via1_set_head(int head) | 588 | void via1_set_head(int head) |
611 | { | 589 | { |
612 | if (head == 0) | 590 | if (head == 0) |
@@ -615,3 +593,9 @@ void via1_set_head(int head) | |||
615 | via1[vBufA] |= VIA1A_vHeadSel; | 593 | via1[vBufA] |= VIA1A_vHeadSel; |
616 | } | 594 | } |
617 | EXPORT_SYMBOL(via1_set_head); | 595 | EXPORT_SYMBOL(via1_set_head); |
596 | |||
597 | int via2_scsi_drq_pending(void) | ||
598 | { | ||
599 | return via2[gIFR] & (1 << IRQ_IDX(IRQ_MAC_SCSIDRQ)); | ||
600 | } | ||
601 | EXPORT_SYMBOL(via2_scsi_drq_pending); | ||