diff options
author | briggs <briggs@cvs.openbsd.org> | 1996-10-30 05:35:02 +0000 |
---|---|---|
committer | briggs <briggs@cvs.openbsd.org> | 1996-10-30 05:35:02 +0000 |
commit | 99f0bbcf3b4edb934109f1b8ff17834cb78ffa52 (patch) | |
tree | be47bba35071e11b134c3334b5781d1319b0a312 /sys/arch/mac68k | |
parent | 63954ebb67f577b86bf70d8afe735e5ef992a614 (diff) |
Go ahead and try dual scsi even though we'll probably need to make another
pass at it.
Macs with scsi offsets of 0x10000 have a SCSI CLK of 16.5MHz. All other
(68k-based) appear to use 25MHz.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r-- | sys/arch/mac68k/dev/esp.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/arch/mac68k/dev/esp.c b/sys/arch/mac68k/dev/esp.c index bcc90ccc880..a55b6b0df13 100644 --- a/sys/arch/mac68k/dev/esp.c +++ b/sys/arch/mac68k/dev/esp.c @@ -248,10 +248,8 @@ espmatch(parent, vcf, aux) #ifdef MAC68K_DRIVER if ((cf->cf_unit == 0) && mac68k_machine.scsi96) return (1); -#if TRY_DUAL_SCSI if ((cf->cf_unit == 1) && mac68k_machine.scsi96_2) return (1); -#endif return (0); #else struct tcdsdev_attach_args *tcdsdev = aux; @@ -321,21 +319,27 @@ espattach(parent, self, aux) #else #ifdef MAC68K_DRIVER if (sc->sc_dev.dv_unit == 0) { + unsigned long reg_offset; + sc->sc_reg = (volatile u_char *) SCSIBase; mac68k_register_scsi_irq((void (*)(void *)) espintr, sc); sc->irq_mask = V2IF_SCSIIRQ; -#if TRY_DUAL_SCSI + reg_offset = SCSIBase - IOBase; + if (reg_offset == 0x10000) { + sc->sc_freq = 16500000; + } else { + sc->sc_freq = 25000000; + } } else { sc->sc_reg = (volatile u_char *) SCSIBase + 0x400; mac68k_register_scsi_b_irq((void (*)(void *)) espintr, sc); - sc->irq_mask = V2IF_SCSIIRQ; /* V2IF_T1? */ -#endif + sc->irq_mask = V2IF_SCSIDRQ; /* V2IF_T1? */ + sc->sc_freq = 25000000; } sc->sc_dma = &sc->_sc_dma; printf(": address %p", sc->sc_reg); sc->sc_id = 7; - sc->sc_freq = 25000000; #else sc->sc_reg = (volatile u_int32_t *)tcdsdev->tcdsda_addr; sc->sc_cookie = tcdsdev->tcdsda_cookie; |