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 Cosmetic changes.



details:   https://anonhg.NetBSD.org/src/rev/1f537ca268dc
branches:  trunk
changeset: 511018:1f537ca268dc
user:      enami <enami%NetBSD.org@localhost>
date:      Mon Jun 11 05:24:06 2001 +0000

description:
Cosmetic changes.

diffstat:

 sys/arch/hpcmips/vr/cmu.c |  55 +++++++++++++++++++++++-----------------------
 1 files changed, 28 insertions(+), 27 deletions(-)

diffs (137 lines):

diff -r 762ea5f72c85 -r 1f537ca268dc sys/arch/hpcmips/vr/cmu.c
--- a/sys/arch/hpcmips/vr/cmu.c Mon Jun 11 05:22:10 2001 +0000
+++ b/sys/arch/hpcmips/vr/cmu.c Mon Jun 11 05:24:06 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmu.c,v 1.3 2001/04/18 10:48:58 sato Exp $     */
+/*     $NetBSD: cmu.c,v 1.4 2001/06/11 05:24:06 enami Exp $    */
 
 /*-
  * Copyright (c) 1999 SASAKI Takesi
@@ -34,6 +34,7 @@
  * SUCH DAMAGE.
  *
  */
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/device.h>
@@ -60,14 +61,12 @@
        int sc_save;
 };
 
-int  vrcmu_match __P((struct device *, struct cfdata *, void *));
-void vrcmu_attach __P((struct device *, struct device *, void *));
+int    vrcmu_match __P((struct device *, struct cfdata *, void *));
+void   vrcmu_attach __P((struct device *, struct device *, void *));
+int    vrcmu_supply __P((vrcmu_chipset_tag_t, u_int16_t, int));
+int    vrcmu_hardpower __P((void *, int, long, void *));
 
-int  vrcmu_supply __P((vrcmu_chipset_tag_t, u_int16_t, int));
-
-int vrcmu_hardpower __P((void *, int, long, void *));
-
-struct vrcmu_function_tag vrcmu_functions  = {
+struct vrcmu_function_tag vrcmu_functions = {
        vrcmu_supply
 };
 
@@ -81,7 +80,8 @@
        struct cfdata *cf;
        void *aux;
 {
-       return 2; /* 1st attach group of vrip */
+
+       return (2);             /* 1st attach group of vrip */
 }
 
 void
@@ -91,22 +91,23 @@
        void *aux;
 {
        struct vrip_attach_args *va = aux;
-       struct vrcmu_softc *sc = (void*)self;
-    
+       struct vrcmu_softc *sc = (void *)self;
+
        sc->sc_iot = va->va_iot;
        if (bus_space_map(sc->sc_iot, va->va_addr, va->va_size,
-                         0 /* no flags */, &sc->sc_ioh)) {
-               printf("vrcmu_attach: can't map i/o space\n");
+           0 /* no flags */, &sc->sc_ioh)) {
+               printf(": can't map i/o space\n");
                return;
        }
+       printf ("\n");
+
        vrip_cmu_function_register(va->va_vc, &vrcmu_functions, self);
-       printf ("\n");
        sc->sc_hardpower = config_hook(CONFIG_HOOK_PMEVENT,
-                                       CONFIG_HOOK_PMEVENT_HARDPOWER,
-                                       CONFIG_HOOK_SHARE,
-                                               vrcmu_hardpower, sc);
+           CONFIG_HOOK_PMEVENT_HARDPOWER,
+           CONFIG_HOOK_SHARE,
+           vrcmu_hardpower, sc);
+}
 
-}
 /* For serial console */
 void
 __vrcmu_supply(mask, onoff)
@@ -115,28 +116,28 @@
 {
        u_int16_t reg;
        u_int32_t addr;
+
        addr = MIPS_PHYS_TO_KSEG1(VRIP_CMU_ADDR);
-       reg = *((volatile u_int16_t*)addr);
+       reg = *((volatile u_int16_t *)addr);
        if (onoff)
                reg |= mask;
        else
                reg &= ~mask;
-       *((volatile u_int16_t*)addr) = reg;
+       *((volatile u_int16_t *)addr) = reg;
 }
 
-
 int
 vrcmu_supply(cc, mask, onoff)
        vrcmu_chipset_tag_t cc;
        u_int16_t mask;
        int onoff;
 {
-       struct vrcmu_softc *sc = (void*)cc;
+       struct vrcmu_softc *sc = (void *)cc;
        u_int16_t reg;
-    
+
        reg = bus_space_read_2(sc->sc_iot, sc->sc_ioh, 0);
 #ifdef VRCMU_VERBOSE
-       printf("cmu register(enter):");    
+       printf("cmu register(enter):");
        bitdisp16(reg);
 #endif
        if (onoff)
@@ -145,10 +146,10 @@
                reg &= ~mask;
        bus_space_write_2(sc->sc_iot, sc->sc_ioh, 0, reg);
 #ifdef VRCMU_VERBOSE
-       printf("cmu register(exit) :");    
+       printf("cmu register(exit) :");
        bitdisp16(reg);
 #endif
-       return 0;
+       return (0);
 }
 
 int
@@ -159,7 +160,7 @@
        void *msg;
 {
        struct vrcmu_softc *sc = ctx;
-       int why =(int)msg;
+       int why = (int)msg;
 
        switch (why) {
        case PWR_STANDBY:



Home | Main Index | Thread Index | Old Index