From 160bf15b090b311f48a324d9aaa47c499869e233 Mon Sep 17 00:00:00 2001 From: takemura Date: Fri, 11 Feb 2000 03:20:17 +0000 Subject: [PATCH] Add com0's power control ID. --- sys/arch/hpcmips/conf/GENERIC | 6 +++--- sys/arch/hpcmips/vr/com_vrip.c | 3 ++- sys/arch/hpcmips/vr/pwctl_vrgiu.c | 14 +++++++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/arch/hpcmips/conf/GENERIC b/sys/arch/hpcmips/conf/GENERIC index 6892b96e838a..7c43b50163a8 100644 --- a/sys/arch/hpcmips/conf/GENERIC +++ b/sys/arch/hpcmips/conf/GENERIC @@ -2,11 +2,11 @@ # Distribution kernel (any model) kernel config file # -# $NetBSD: GENERIC,v 1.27 2000/02/10 08:45:44 sato Exp $ +# $NetBSD: GENERIC,v 1.28 2000/02/11 03:20:17 takemura Exp $ # include "arch/hpcmips/conf/std.hpcmips" -#ident "GENERIC-$Revision: 1.27 $" +#ident "GENERIC-$Revision: 1.28 $" maxusers 8 @@ -113,7 +113,7 @@ vrrtc* at vrip? addr 0x0b0000c0 size 0x20 intr 2 vrkiu* at vrip? addr 0x0b000180 size 0x20 intr 7 options __NO_SOFT_SERIAL_INTERRUPT -com* at vrip? addr 0x0c000000 size 0x20 intr 9 +com* at vrip? addr 0x0c000000 size 0x20 intr 9 pwctl PWCTL_COM0 vrgiu* at vrip? addr 0x0b000100 size 0x20 intr 8 vrpmu* at vrip? addr 0x0b0000a0 size 0x20 intr 1 # power switch vrdsu* at vrip? addr 0x0b0000e0 size 0x08 diff --git a/sys/arch/hpcmips/vr/com_vrip.c b/sys/arch/hpcmips/vr/com_vrip.c index 442567f572c9..71c1254c0f0c 100644 --- a/sys/arch/hpcmips/vr/com_vrip.c +++ b/sys/arch/hpcmips/vr/com_vrip.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_vrip.c,v 1.2 1999/12/23 06:26:10 takemura Exp $ */ +/* $NetBSD: com_vrip.c,v 1.3 2000/02/11 03:20:21 takemura Exp $ */ /*- * Copyright (c) 1999 SASAKI Takesi. All rights reserved. @@ -70,6 +70,7 @@ #include "locators.h" +#define COMVRIPDEBUG #ifdef COMVRIPDEBUG int com_vrip_debug = 0; #define DPRINTF(arg) if (com_vrip_debug) printf arg; diff --git a/sys/arch/hpcmips/vr/pwctl_vrgiu.c b/sys/arch/hpcmips/vr/pwctl_vrgiu.c index 3cef685766e5..f56ac96d354d 100644 --- a/sys/arch/hpcmips/vr/pwctl_vrgiu.c +++ b/sys/arch/hpcmips/vr/pwctl_vrgiu.c @@ -1,4 +1,4 @@ -/* $NetBSD: pwctl_vrgiu.c,v 1.2 2000/02/09 14:39:06 takemura Exp $ */ +/* $NetBSD: pwctl_vrgiu.c,v 1.3 2000/02/11 03:20:21 takemura Exp $ */ /*- * Copyright (c) 1999 @@ -50,6 +50,14 @@ #include "locators.h" +#define PWCTLVRGIUDEBUG +#ifdef PWCTLVRGIUDEBUG +int pwctl_vrgiu_debug = 0; +#define DPRINTF(arg) if (pwctl_vrgiu_debug) printf arg; +#else +#define DPRINTF(arg) +#endif + struct pwctl_vrgiu_softc { struct device sc_dev; vrgiu_chipset_tag_t sc_gc; @@ -130,8 +138,8 @@ pwctl_vrgiu_hook(ctx, type, id, msg) { struct pwctl_vrgiu_softc *sc = ctx; - printf("pwctl hook: port %d %s(%d)", sc->sc_port, - msg ? "ON" : "OFF", msg ? sc->sc_on : sc->sc_off); + DPRINTF(("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);