Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Add a missing DELAY() in the initial GPIO setup f...



details:   https://anonhg.NetBSD.org/src/rev/be67f6d9cc36
branches:  trunk
changeset: 533738:be67f6d9cc36
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Mon Jul 08 18:43:54 2002 +0000

description:
Add a missing DELAY() in the initial GPIO setup for the 21140.

diffstat:

 sys/dev/ic/tulip.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r db3dcc8f648d -r be67f6d9cc36 sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Mon Jul 08 18:00:29 2002 +0000
+++ b/sys/dev/ic/tulip.c        Mon Jul 08 18:43:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulip.c,v 1.115 2002/06/01 23:50:59 lukem Exp $        */
+/*     $NetBSD: tulip.c,v 1.116 2002/07/08 18:43:54 mycroft Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.115 2002/06/01 23:50:59 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.116 2002/07/08 18:43:54 mycroft Exp $");
 
 #include "bpfilter.h"
 
@@ -3521,8 +3521,10 @@
        }
 
        /* If there were no sequences, just lower the pins. */
-       if (tm->tm_reset_length == 0 && tm->tm_gp_length == 0)
+       if (tm->tm_reset_length == 0 && tm->tm_gp_length == 0) {
+               delay(10);
                TULIP_WRITE(sc, CSR_GPP, 0);
+       }
 }
 
 /*
@@ -5158,16 +5160,15 @@
 
        tlp_idle(sc, OPMODE_ST|OPMODE_SR);
 
-       sc->sc_opmode &= ~(OPMODE_PS|OPMODE_PCS|OPMODE_SCR|OPMODE_TTM);
-       sc->sc_opmode |= OPMODE_FD|OPMODE_HBD;
+       sc->sc_opmode &= ~(OPMODE_PS|OPMODE_PCS|OPMODE_SCR);
+       sc->sc_opmode |= OPMODE_TTM|OPMODE_FD|OPMODE_HBD;
        TULIP_WRITE(sc, CSR_OPMODE, sc->sc_opmode);
 
        TULIP_WRITE(sc, CSR_SIACONN, 0);
        delay(1000);
+       TULIP_WRITE(sc, CSR_SIATXRX, 0x3ffff);
        TULIP_WRITE(sc, CSR_SIACONN, SIACONN_SRL);
 
-       TULIP_WRITE(sc, CSR_SIATXRX, 0x3ffff);
-
        siastat = TULIP_READ(sc, CSR_SIASTAT);
        siastat &= ~(SIASTAT_ANS|SIASTAT_LPC|SIASTAT_TRA|SIASTAT_ARA|SIASTAT_LS100|SIASTAT_LS10|SIASTAT_MRA);
        siastat |= SIASTAT_ANS_TXDIS;



Home | Main Index | Thread Index | Old Index