Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/arch/alpha/tc Pull up revisions 1.28-1.29 (requeste...



details:   https://anonhg.NetBSD.org/src/rev/26e24ae8f262
branches:  netbsd-1-4
changeset: 469841:26e24ae8f262
user:      he <he%NetBSD.org@localhost>
date:      Sat Dec 04 19:38:24 1999 +0000

description:
Pull up revisions 1.28-1.29 (requested by mhitch):
  Fix the problems in detecting the clock speed on the TCDS Dual
  SCSI Option cards, and correctly configure the Fast SCSI interfaces.
  This allows installation on the 3000/500 -> 3000/900 Alphas which
  have the Fast SCSI interface on the on-board SCSI adapters.

diffstat:

 sys/arch/alpha/tc/tcds.c |  21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diffs (60 lines):

diff -r a3444a7da050 -r 26e24ae8f262 sys/arch/alpha/tc/tcds.c
--- a/sys/arch/alpha/tc/tcds.c  Sat Dec 04 19:37:14 1999 +0000
+++ b/sys/arch/alpha/tc/tcds.c  Sat Dec 04 19:38:24 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcds.c,v 1.26 1999/03/02 01:44:30 nisimura Exp $ */
+/* $NetBSD: tcds.c,v 1.26.2.1 1999/12/04 19:38:24 he 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.26 1999/03/02 01:44:30 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.26.2.1 1999/12/04 19:38:24 he Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -297,15 +297,17 @@
                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) {
+               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;
-               } else {
-                       tcdsdev.tcdsda_freq = 40000000;
-                       tcdsdev.tcdsda_period = tcdsdev.tcdsda_fast ? 4 : 8;
                }
                if (sc->sc_flags & TCDSF_BASEBOARD)
                        tcdsdev.tcdsda_variant = NCR_VARIANT_NCR53C94;
@@ -575,7 +577,7 @@
        u_int32_t ids;
 
 #ifdef __alpha__
-       if (sc->sc_flags && TCDSF_BASEBOARD) {
+       if (sc->sc_flags & TCDSF_BASEBOARD) {
                extern u_int8_t dec_3000_scsiid[], dec_3000_scsifast[];
 
                id = dec_3000_scsiid[chip];
@@ -602,9 +604,6 @@
                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);



Home | Main Index | Thread Index | Old Index