summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mac68k/dev')
-rw-r--r--sys/arch/mac68k/dev/esp.c16
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;