Skip to content

Commit aa8a9fb

Browse files
Finn Thaingeertu
authored andcommitted
mac_scsi: fix mac_scsi on some powerbooks
Fix the mac_scsi interrupt edge trigger on non-RBV PowerBooks. This doesn't appear to help my PowerBook 520 but the NetBSD source reveals that the PowerBook 500 series is different than the others. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent 4107c45 commit aa8a9fb

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

‎arch/m68k/mac/via.c‎

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -253,22 +253,28 @@ void __init via_init(void)
253253
via2[vACR] &= ~0x03; /* disable port A & B latches */
254254
}
255255

256+
/* Everything below this point is VIA2 only... */
257+
258+
if (rbv_present)
259+
return;
260+
256261
/*
257-
* Set vPCR for control line interrupts (but not on RBV)
262+
* Set vPCR for control line interrupts.
263+
*
264+
* CA1 (SLOTS IRQ), CB1 (ASC IRQ): negative edge trigger.
265+
*
266+
* Macs with ESP SCSI have a negative edge triggered SCSI interrupt.
267+
* Testing reveals that PowerBooks do too. However, the SE/30
268+
* schematic diagram shows an active high NCR5380 IRQ line.
258269
*/
259-
if (!rbv_present) {
260-
/* For all VIA types, CA1 (SLOTS IRQ) and CB1 (ASC IRQ)
261-
* are made negative edge triggered here.
262-
*/
263-
if (macintosh_config->scsi_type == MAC_SCSI_OLD) {
264-
/* CB2 (IRQ) indep. input, positive edge */
265-
/* CA2 (DRQ) indep. input, positive edge */
266-
via2[vPCR] = 0x66;
267-
} else {
268-
/* CB2 (IRQ) indep. input, negative edge */
269-
/* CA2 (DRQ) indep. input, negative edge */
270-
via2[vPCR] = 0x22;
271-
}
270+
271+
pr_debug("VIA2 vPCR is 0x%02X\n", via2[vPCR]);
272+
if (macintosh_config->via_type == MAC_VIA_II) {
273+
/* CA2 (SCSI DRQ), CB2 (SCSI IRQ): indep. input, pos. edge */
274+
via2[vPCR] = 0x66;
275+
} else {
276+
/* CA2 (SCSI DRQ), CB2 (SCSI IRQ): indep. input, neg. edge */
277+
via2[vPCR] = 0x22;
272278
}
273279
}
274280

0 commit comments

Comments
 (0)