diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2011-10-23 18:11:14 +0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-12-10 22:52:46 +0400 |
commit | 30c0527d15ce4edcde64581e9d062ba9fb08fe16 (patch) | |
tree | da3e996d43a671d2d66075fdc7676f17c688b415 /arch/m68k/mac/via.c | |
parent | 56e63689fd866a865682fe14dc5a7e1ec3b2c3ad (diff) | |
download | linux-30c0527d15ce4edcde64581e9d062ba9fb08fe16.tar.xz |
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) { } } -/* - * Returns nonzero if an interrupt is pending on the given - * VIA/IRQ combination. - */ - -int via_irq_pending(int irq) -{ - int irq_src = IRQ_SRC(irq); - int irq_idx = IRQ_IDX(irq); - int irq_bit = 1 << irq_idx; - - if (irq_src == 1) { - return via1[vIFR] & irq_bit; - } else if (irq_src == 2) { - return via2[gIFR] & irq_bit; - } else if (irq_src == 7) { - /* Always 0 for MAC_VIA_QUADRA if the slot irq is disabled. */ - return ~via2[gBufA] & irq_bit; - } - return 0; -} - void via1_set_head(int head) { if (head == 0) @@ -615,3 +593,9 @@ void via1_set_head(int head) via1[vBufA] |= VIA1A_vHeadSel; } EXPORT_SYMBOL(via1_set_head); + +int via2_scsi_drq_pending(void) +{ + return via2[gIFR] & (1 << IRQ_IDX(IRQ_MAC_SCSIDRQ)); +} +EXPORT_SYMBOL(via2_scsi_drq_pending); |