Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/vr The pwctl writes ZERO as on if active=0.



details:   https://anonhg.NetBSD.org/src/rev/15f73905be52
branches:  trunk
changeset: 481934:15f73905be52
user:      takemura <takemura%NetBSD.org@localhost>
date:      Wed Feb 09 14:39:06 2000 +0000

description:
The pwctl writes ZERO as on if active=0.

diffstat:

 sys/arch/hpcmips/vr/pwctl_vrgiu.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 135490c338c6 -r 15f73905be52 sys/arch/hpcmips/vr/pwctl_vrgiu.c
--- a/sys/arch/hpcmips/vr/pwctl_vrgiu.c Wed Feb 09 14:22:14 2000 +0000
+++ b/sys/arch/hpcmips/vr/pwctl_vrgiu.c Wed Feb 09 14:39:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pwctl_vrgiu.c,v 1.1 1999/12/23 06:26:10 takemura Exp $ */
+/*     $NetBSD: pwctl_vrgiu.c,v 1.2 2000/02/09 14:39:06 takemura Exp $ */
 
 /*-
  * Copyright (c) 1999
@@ -56,6 +56,7 @@
        vrgiu_function_tag_t sc_gf;
        int sc_port;
        long sc_id;
+       int sc_on, sc_off;
        config_hook_tag sc_hook_tag;
 };
 
@@ -105,7 +106,9 @@
        loc = sc->sc_dev.dv_cfdata->cf_loc;
        sc->sc_port = loc[NEWGPBUSIFCF_PORT];
        sc->sc_id = loc[NEWGPBUSIFCF_ID];
-       printf(" port=%d id=%ld", sc->sc_port, sc->sc_id);
+       sc->sc_on = loc[NEWGPBUSIFCF_ACTIVE] ? 1 : 0;
+       sc->sc_off = loc[NEWGPBUSIFCF_ACTIVE] ? 0 : 1;
+       printf(" port=%d id=%ld on=%d", sc->sc_port, sc->sc_id, sc->sc_on);
 
        if (sc->sc_port == NEWGPBUSIFCF_PORT_DEFAULT ||
            sc->sc_id == NEWGPBUSIFCF_ID_DEFAULT) {
@@ -127,7 +130,9 @@
 {
        struct pwctl_vrgiu_softc *sc = ctx;
 
-       printf("pwctl hook: port %d %s", sc->sc_port, msg ? "ON" : "OFF");
-       sc->sc_gf->gf_portwrite(sc->sc_gc, sc->sc_port, msg ? 1 : 0);
+       printf("pwctl hook: port %d %s(%d)", sc->sc_port,
+              msg ? "ON" : "OFF", msg ? sc->sc_on : sc->sc_off);
+       sc->sc_gf->gf_portwrite(sc->sc_gc, sc->sc_port,
+                               msg ? sc->sc_on : sc->sc_off);
        return (0);
 }



Home | Main Index | Thread Index | Old Index