aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2011-10-23 10:11:21 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-12-10 13:52:47 -0500
commitaa8a9fbe18bbbcf25bf5e3c7155e886057dcf171 (patch)
treeb9e5baaa6ce8a77c2d489656097ec5d60848ee0c /arch/m68k
parent4107c459fe4075c5a2d552fd8d9d5fea10c1ff93 (diff)
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>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/mac/via.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 97996a48b048..7a2993bb092d 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -253,22 +253,28 @@ void __init via_init(void)
253 via2[vACR] &= ~0x03; /* disable port A & B latches */ 253 via2[vACR] &= ~0x03; /* disable port A & B latches */
254 } 254 }
255 255
256 /* Everything below this point is VIA2 only... */
257
258 if (rbv_present)
259 return;
260
256 /* 261 /*
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.
258 */ 269 */
259 if (!rbv_present) { 270
260 /* For all VIA types, CA1 (SLOTS IRQ) and CB1 (ASC IRQ) 271 pr_debug("VIA2 vPCR is 0x%02X\n", via2[vPCR]);
261 * are made negative edge triggered here. 272 if (macintosh_config->via_type == MAC_VIA_II) {
262 */ 273 /* CA2 (SCSI DRQ), CB2 (SCSI IRQ): indep. input, pos. edge */
263 if (macintosh_config->scsi_type == MAC_SCSI_OLD) { 274 via2[vPCR] = 0x66;
264 /* CB2 (IRQ) indep. input, positive edge */ 275 } else {
265 /* CA2 (DRQ) indep. input, positive edge */ 276 /* CA2 (SCSI DRQ), CB2 (SCSI IRQ): indep. input, neg. edge */
266 via2[vPCR] = 0x66; 277 via2[vPCR] = 0x22;
267 } else {
268 /* CB2 (IRQ) indep. input, negative edge */
269 /* CA2 (DRQ) indep. input, negative edge */
270 via2[vPCR] = 0x22;
271 }
272 } 278 }
273} 279}
274 280