Correct the clock speed setting: the GPI2 bit is only for the Alpha baseboard

TCDS;  the TC option card has it's own clock.

Also don't use the TCDSF_FASTSCSI flag to clear fast mode - just rely on the
PROM environment.
This commit is contained in:
mhitch 1999-09-22 03:32:42 +00:00
parent ba734be86b
commit fd6f19b057
1 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcds.c,v 1.27 1999/04/10 01:21:38 cgd Exp $ */
/* $NetBSD: tcds.c,v 1.28 1999/09/22 03:32:42 mhitch Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.27 1999/04/10 01:21:38 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.28 1999/09/22 03:32:42 mhitch Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -294,15 +294,17 @@ tcdsattach(parent, self, aux)
tcdsdev.tcdsda_chip = i;
tcdsdev.tcdsda_sc = &sc->sc_slots[i];
/*
* Determine the chip frequency. If GPI2 is set, we have a
* Determine the chip frequency. TCDSF_FASTSCSI will be set
* for TC option cards. For baseboard chips, GPI2 is set, for a
* 25MHz clock, else a 40MHz clock.
*/
if (gpi2) {
tcdsdev.tcdsda_freq = 25000000;
tcdsdev.tcdsda_period = 5;
} else {
if ((sc->sc_flags & TCDSF_BASEBOARD && gpi2 == 0) ||
sc->sc_flags & TCDSF_FASTSCSI) {
tcdsdev.tcdsda_freq = 40000000;
tcdsdev.tcdsda_period = tcdsdev.tcdsda_fast ? 4 : 8;
} else {
tcdsdev.tcdsda_freq = 25000000;
tcdsdev.tcdsda_period = 5;
}
if (sc->sc_flags & TCDSF_BASEBOARD)
tcdsdev.tcdsda_variant = NCR_VARIANT_NCR53C94;
@ -599,9 +601,6 @@ tcds_params(sc, chip, idp, fastp)
id = 7;
}
if ((sc->sc_flags & TCDSF_FASTSCSI) == 0)
fast = 0;
if (fast)
printf("%s: fast mode set for chip %d\n",
sc->sc_dv.dv_xname, chip);