aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac/via.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/mac/via.c')
-rw-r--r--arch/m68k/mac/via.c28
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
593int 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
610void via1_set_head(int head) 588void 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}
617EXPORT_SYMBOL(via1_set_head); 595EXPORT_SYMBOL(via1_set_head);
596
597int via2_scsi_drq_pending(void)
598{
599 return via2[gIFR] & (1 << IRQ_IDX(IRQ_MAC_SCSIDRQ));
600}
601EXPORT_SYMBOL(via2_scsi_drq_pending);