Correct 53c710 initialization for the A4000T. Remove the A4000T probe
debugging output.
This commit is contained in:
parent
0acf990595
commit
48118d719d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: afsc.c,v 1.10 1996/01/28 19:23:24 chopps Exp $ */
|
||||
/* $NetBSD: afsc.c,v 1.11 1996/03/15 22:11:09 mhitch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -78,7 +78,7 @@ struct cfdriver afsccd = {
|
|||
NULL, "afsc", (cfmatch_t)afscmatch, afscattach,
|
||||
DV_DULL, sizeof(struct siop_softc), NULL, 0 };
|
||||
struct cfdriver aftsccd = {
|
||||
NULL, "afsc", (cfmatch_t)afscmatch, afscattach,
|
||||
NULL, "aftsc", (cfmatch_t)afscmatch, afscattach,
|
||||
DV_DULL, sizeof(struct siop_softc), NULL, 0 };
|
||||
|
||||
/*
|
||||
|
@ -99,24 +99,14 @@ afscmatch(pdp, cdp, auxp)
|
|||
return(1); /* It's an A4091 SCSI card */
|
||||
if (!is_a4000() || !matchname(auxp, "afsc"))
|
||||
return(0); /* Not on an A4000 or not A4000T SCSI */
|
||||
#ifdef DEBUG
|
||||
printf("afscmatch: probing for A4000T\n");
|
||||
#endif
|
||||
rp = ztwomap(0xdd0040);
|
||||
if (badaddr(&rp->siop_scratch) || badaddr(&rp->siop_temp)) {
|
||||
#ifdef DEBUG
|
||||
printf("afscmatch: A4000T probed bad address\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
scratch = rp->siop_scratch;
|
||||
temp = rp->siop_temp;
|
||||
rp->siop_scratch = 0xdeadbeef;
|
||||
rp->siop_temp = 0xaaaa5555;
|
||||
#ifdef DEBUG
|
||||
printf("afscmatch: probe %x %x %x %x\n", scratch, temp,
|
||||
rp->siop_scratch, rp->siop_temp);
|
||||
#endif
|
||||
if (rp->siop_scratch != 0xdeadbeef || rp->siop_temp != 0xaaaa5555)
|
||||
return(0);
|
||||
rp->siop_scratch = scratch;
|
||||
|
@ -149,7 +139,8 @@ afscattach(pdp, dp, auxp)
|
|||
* CTEST7 = 80 [disable burst]
|
||||
*/
|
||||
sc->sc_clock_freq = 50; /* Clock = 50Mhz */
|
||||
sc->sc_ctest7 = 0x80; /* CDIS */
|
||||
sc->sc_ctest7 = SIOP_CTEST7_CDIS;
|
||||
sc->sc_dcntl = SIOP_DCNTL_EA;
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_target = 7;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mgnsc.c,v 1.15 1995/10/09 15:20:36 chopps Exp $ */
|
||||
/* $NetBSD: mgnsc.c,v 1.16 1996/03/15 22:11:12 mhitch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -114,7 +114,8 @@ mgnscattach(pdp, dp, auxp)
|
|||
* CTEST7 = TT1
|
||||
*/
|
||||
sc->sc_clock_freq = 33; /* Clock = 33Mhz */
|
||||
sc->sc_ctest7 = 0x02; /* TT1 */
|
||||
sc->sc_ctest7 = SIOP_CTEST7_TT1;
|
||||
sc->sc_dcntl = 0x00;
|
||||
|
||||
alloc_sicallback();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: siop.c,v 1.28 1996/02/03 18:47:07 chuck Exp $ */
|
||||
/* $NetBSD: siop.c,v 1.29 1996/03/15 22:11:15 mhitch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -94,7 +94,7 @@ int siop_cmd_wait = SCSI_CMD_WAIT;
|
|||
int siop_data_wait = SCSI_DATA_WAIT;
|
||||
int siop_init_wait = SCSI_INIT_WAIT;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_SYNC
|
||||
/*
|
||||
* sync period transfer lookup - only valid for 66Mhz clock
|
||||
*/
|
||||
|
@ -357,15 +357,21 @@ siop_scsidone(acb, stat)
|
|||
struct siop_acb *acb;
|
||||
int stat;
|
||||
{
|
||||
struct scsi_xfer *xs = acb->xs;
|
||||
struct scsi_link *slp = xs->sc_link;
|
||||
struct siop_softc *sc = slp->adapter_softc;
|
||||
struct scsi_xfer *xs;
|
||||
struct scsi_link *slp;
|
||||
struct siop_softc *sc;
|
||||
int s, dosched = 0;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (acb == NULL || xs == NULL)
|
||||
panic("siop_scsidone");
|
||||
if (acb == NULL || (xs = acb->xs) == NULL) {
|
||||
/* panic("siop_scsidone"); */
|
||||
printf("siop_scsidone: sc_nexus NULL\n");
|
||||
Debugger();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
slp = xs->sc_link;
|
||||
sc = slp->adapter_softc;
|
||||
/*
|
||||
* XXX Support old-style instrumentation for now.
|
||||
* IS THIS REALLY THE RIGHT PLACE FOR THIS? --thorpej
|
||||
|
@ -553,16 +559,16 @@ siopinitialize(sc)
|
|||
if (sc->sc_minsync < 25)
|
||||
sc->sc_minsync = 25;
|
||||
if (sc->sc_clock_freq <= 25) {
|
||||
sc->sc_dcntl = 0x80; /* SCLK/1 */
|
||||
sc->sc_dcntl |= 0x80; /* SCLK/1 */
|
||||
sc->sc_tcp[0] = sc->sc_tcp[1];
|
||||
} else if (sc->sc_clock_freq <= 37) {
|
||||
sc->sc_dcntl = 0x40; /* SCLK/1.5 */
|
||||
sc->sc_dcntl |= 0x40; /* SCLK/1.5 */
|
||||
sc->sc_tcp[0] = sc->sc_tcp[2];
|
||||
} else if (sc->sc_clock_freq <= 50) {
|
||||
sc->sc_dcntl = 0x00; /* SCLK/2 */
|
||||
sc->sc_dcntl |= 0x00; /* SCLK/2 */
|
||||
sc->sc_tcp[0] = sc->sc_tcp[3];
|
||||
} else {
|
||||
sc->sc_dcntl = 0xc0; /* SCLK/3 */
|
||||
sc->sc_dcntl |= 0xc0; /* SCLK/3 */
|
||||
sc->sc_tcp[0] = 3000 / sc->sc_clock_freq;
|
||||
}
|
||||
|
||||
|
@ -1083,7 +1089,7 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
|
|||
*status = STS_BUSY;
|
||||
if (sc->nexus_list.tqh_first)
|
||||
rp->siop_dsp = sc->sc_scriptspa + Ent_wait_reselect;
|
||||
return 1;
|
||||
return (acb != NULL);
|
||||
}
|
||||
if (dstat & SIOP_DSTAT_SIR && (rp->siop_dsps == 0xff01 ||
|
||||
rp->siop_dsps == 0xff02)) {
|
||||
|
@ -1159,8 +1165,14 @@ siop_checkintr(sc, istat, dstat, sstat0, status)
|
|||
acb->ds.chain[i].datalen))
|
||||
break;
|
||||
}
|
||||
if (i >= DMAMAXIO || acb->ds.chain[i].datalen == 0)
|
||||
printf("couldn't find saved data pointer\n");
|
||||
if (i >= DMAMAXIO || acb->ds.chain[i].datalen == 0) {
|
||||
printf("couldn't find saved data pointer: ");
|
||||
printf("curbuf %x curlen %x i %d\n",
|
||||
acb->iob_curbuf, acb->iob_curlen, i);
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (siop_debug & 0x100)
|
||||
printf(" chain[0]: %x/%x -> %x/%x\n",
|
||||
|
@ -1429,8 +1441,9 @@ siopintr (sc)
|
|||
printf ("%s: intr istat %x dstat %x sstat0 %x\n",
|
||||
sc->sc_dev.dv_xname, istat, dstat, sstat0);
|
||||
if (!sc->sc_active) {
|
||||
printf ("%s: spurious interrupt? istat %x dstat %x sstat0 %x status %x\n",
|
||||
sc->sc_dev.dv_xname, istat, dstat, sstat0, sc->sc_nexus->stat[0]);
|
||||
printf ("%s: spurious interrupt? istat %x dstat %x sstat0 %x nexus %x status %x\n",
|
||||
sc->sc_dev.dv_xname, istat, dstat, sstat0,
|
||||
sc->sc_nexus, sc->sc_nexus ? sc->sc_nexus->stat[0] : 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1464,7 +1477,8 @@ siopintr (sc)
|
|||
rp->siop_dsp - sc->sc_scriptspa);
|
||||
}
|
||||
#endif
|
||||
siop_scsidone(sc->sc_nexus, sc->sc_nexus->stat[0]);
|
||||
siop_scsidone(sc->sc_nexus, sc->sc_nexus ?
|
||||
sc->sc_nexus->stat[0] : -1);
|
||||
}
|
||||
}
|
||||
splx(s);
|
||||
|
@ -1482,7 +1496,7 @@ scsi_period_to_siop (sc, target)
|
|||
|
||||
period = sc->sc_nexus->msg[4];
|
||||
offset = sc->sc_nexus->msg[5];
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_SYNC
|
||||
sxfer = 0;
|
||||
if (offset <= SIOP_MAX_OFFSET)
|
||||
sxfer = offset;
|
||||
|
@ -1510,14 +1524,16 @@ scsi_period_to_siop (sc, target)
|
|||
} else {
|
||||
sxfer = (sxfer << 4) | ((offset <= SIOP_MAX_OFFSET) ?
|
||||
offset : SIOP_MAX_OFFSET);
|
||||
#ifdef DEBUG_SYNC
|
||||
printf("siop sync: params for period %dns: sxfer %x sbcl %x",
|
||||
period * 4, sxfer, sbcl);
|
||||
printf(" actual period %dns\n",
|
||||
sc->sc_tcp[sbcl] * ((sxfer >> 4) + 4));
|
||||
#endif
|
||||
}
|
||||
sc->sc_sync[target].sxfer = sxfer;
|
||||
sc->sc_sync[target].sbcl = sbcl;
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_SYNC
|
||||
printf ("siop sync: siop_sxfr %02x, siop_sbcl %02x\n", sxfer, sbcl);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wesc.c,v 1.10 1995/09/16 16:11:32 chopps Exp $ */
|
||||
/* $NetBSD: wesc.c,v 1.11 1996/03/15 22:11:19 mhitch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -114,7 +114,8 @@ wescattach(pdp, dp, auxp)
|
|||
* CTEST7 = SC0, TT1
|
||||
*/
|
||||
sc->sc_clock_freq = 50; /* Clock = 50Mhz */
|
||||
sc->sc_ctest7 = 0x22; /* SC0 + TT1 */
|
||||
sc->sc_ctest7 = SIOP_CTEST7_SC0 | SIOP_CTEST7_TT1;
|
||||
sc->sc_dcntl = 0x00;
|
||||
|
||||
sc->sc_link.adapter_softc = sc;
|
||||
sc->sc_link.adapter_target = 7;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zssc.c,v 1.13 1995/10/09 15:20:38 chopps Exp $ */
|
||||
/* $NetBSD: zssc.c,v 1.14 1996/03/15 22:11:22 mhitch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
|
@ -116,6 +116,7 @@ zsscattach(pdp, dp, auxp)
|
|||
*/
|
||||
sc->sc_clock_freq = 66; /* Clock = 66Mhz */
|
||||
sc->sc_ctest7 = 0x00;
|
||||
sc->sc_dcntl = 0x00;
|
||||
|
||||
alloc_sicallback();
|
||||
|
||||
|
|
Loading…
Reference in New Issue