Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips Straightened vripvar.h



details:   https://anonhg.NetBSD.org/src/rev/6b9bcaf64260
branches:  trunk
changeset: 521210:6b9bcaf64260
user:      takemura <takemura%NetBSD.org@localhost>
date:      Sat Jan 26 10:50:43 2002 +0000

description:
Straightened vripvar.h

diffstat:

 sys/arch/hpcmips/conf/files.hpcmips |   3 +-
 sys/arch/hpcmips/hpcmips/bitdisp.c  |  67 +++++++++++++++++++++++++++++++++++++
 sys/arch/hpcmips/include/bitdisp.h  |  38 ++++++++++++++++++++
 sys/arch/hpcmips/isa/isa_machdep.c  |   3 +-
 sys/arch/hpcmips/vr/bcu_vrip.c      |   3 +-
 sys/arch/hpcmips/vr/cmu.c           |   3 +-
 sys/arch/hpcmips/vr/vrgiu.c         |   3 +-
 sys/arch/hpcmips/vr/vrip.c          |  54 ++++++++---------------------
 sys/arch/hpcmips/vr/vripvar.h       |  36 +------------------
 sys/arch/hpcmips/vr/vrpmu.c         |   3 +-
 10 files changed, 135 insertions(+), 78 deletions(-)

diffs (truncated from 376 to 300 lines):

diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/conf/files.hpcmips
--- a/sys/arch/hpcmips/conf/files.hpcmips       Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/conf/files.hpcmips       Sat Jan 26 10:50:43 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.hpcmips,v 1.66 2002/01/04 14:11:50 takemura Exp $
+#      $NetBSD: files.hpcmips,v 1.67 2002/01/26 10:50:43 takemura Exp $
 
 # maxpartitions must be first item in files.${ARCH}.
 maxpartitions 8
@@ -59,6 +59,7 @@
 file   arch/hpcmips/hpcmips/interrupt.c
 file   arch/hpcmips/hpcmips/machdep.c
 file   arch/hpcmips/hpcmips/mainbus.c
+file   arch/hpcmips/hpcmips/bitdisp.c
 file   arch/hpcmips/hpcmips/procfs_machdep.c   procfs
 
 #
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/hpcmips/bitdisp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/hpcmips/bitdisp.c        Sat Jan 26 10:50:43 2002 +0000
@@ -0,0 +1,67 @@
+/*     $NetBSD: bitdisp.c,v 1.1 2002/01/26 10:50:44 takemura Exp $     */
+
+/*-
+ * Copyright (c) 1999, 2002 TAKEMURA Shin
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/systm.h>
+#include <machine/bitdisp.h>
+
+void
+bitdisp16(u_int16_t a)
+{
+       u_int16_t j;
+
+       for (j = 0x8000; j > 0; j >>=1)
+               printf ("%c", a&j ?'|':'.');
+       printf ("\n");
+}
+
+void
+bitdisp32(u_int32_t a)
+{
+       u_int32_t j;
+
+       for (j = 0x80000000; j > 0; j >>=1)
+               printf ("%c" , a&j ? '|' : '.');
+       printf ("\n");
+}
+
+void
+bitdisp64(u_int32_t a[2])
+{
+       u_int32_t j;
+
+       for( j = 0x80000000 ; j > 0 ; j >>=1 )
+               printf("%c" , a[1]&j ?';':',' );
+       for( j = 0x80000000 ; j > 0 ; j >>=1 )
+               printf("%c" , a[0]&j ?'|':'.' );
+       printf("\n");
+}
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/include/bitdisp.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/include/bitdisp.h        Sat Jan 26 10:50:43 2002 +0000
@@ -0,0 +1,38 @@
+/*     $NetBSD: bitdisp.h,v 1.1 2002/01/26 10:50:44 takemura Exp $     */
+
+/*-
+ * Copyright (c) 1999, 2002 TAKEMURA Shin
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+    
+/*
+ * Debuggin utility
+ */    
+void bitdisp16(u_int16_t);
+void bitdisp32(u_int32_t);
+void bitdisp64(u_int32_t[2]);
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/isa/isa_machdep.c
--- a/sys/arch/hpcmips/isa/isa_machdep.c        Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/isa/isa_machdep.c        Sat Jan 26 10:50:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_machdep.c,v 1.20 2002/01/05 05:09:15 takemura Exp $        */
+/*     $NetBSD: isa_machdep.c,v 1.21 2002/01/26 10:50:43 takemura Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -49,6 +49,7 @@
 #include <machine/platid_mask.h>
 #include <machine/bus.h>
 #include <machine/bus_space_hpcmips.h>
+#include <machine/bitdisp.h>
 
 #include <dev/hpc/hpciovar.h>
 
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/vr/bcu_vrip.c
--- a/sys/arch/hpcmips/vr/bcu_vrip.c    Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/vr/bcu_vrip.c    Sat Jan 26 10:50:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcu_vrip.c,v 1.12 2001/09/16 05:32:20 uch Exp $        */
+/*     $NetBSD: bcu_vrip.c,v 1.13 2002/01/26 10:50:44 takemura Exp $   */
 
 /*-
  * Copyright (c) 1999-2001 SATO Kazumi. All rights reserved.
@@ -40,6 +40,7 @@
 #include <sys/reboot.h>
 
 #include <machine/bus.h>
+#include <machine/bitdisp.h>
 
 #include <mips/cpuregs.h>
 
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/vr/cmu.c
--- a/sys/arch/hpcmips/vr/cmu.c Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/vr/cmu.c Sat Jan 26 10:50:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmu.c,v 1.5 2001/09/16 05:32:20 uch Exp $      */
+/*     $NetBSD: cmu.c,v 1.6 2002/01/26 10:50:44 takemura Exp $ */
 
 /*-
  * Copyright (c) 1999 SASAKI Takesi
@@ -42,6 +42,7 @@
 #include <mips/cpuregs.h>
 
 #include <machine/bus.h>
+#include <machine/bitdisp.h>
 
 #include "opt_vr41xx.h"
 #include <hpcmips/vr/vr.h>
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/vr/vrgiu.c
--- a/sys/arch/hpcmips/vr/vrgiu.c       Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/vr/vrgiu.c       Sat Jan 26 10:50:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vrgiu.c,v 1.28 2001/12/29 05:15:32 takemura Exp $      */
+/*     $NetBSD: vrgiu.c,v 1.29 2002/01/26 10:50:44 takemura Exp $      */
 /*-
  * Copyright (c) 1999-2001
  *         Shin Takemura and PocketBSD Project. All rights reserved.
@@ -43,6 +43,7 @@
 #include <mips/cpuregs.h>
 #include <machine/bus.h>
 #include <machine/config_hook.h>
+#include <machine/bitdisp.h>
 
 #include <dev/hpc/hpciovar.h>
 
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/vr/vrip.c
--- a/sys/arch/hpcmips/vr/vrip.c        Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/vr/vrip.c        Sat Jan 26 10:50:43 2002 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: vrip.c,v 1.13 2002/01/02 13:13:21 uch Exp $    */
+/*     $NetBSD: vrip.c,v 1.14 2002/01/26 10:50:44 takemura Exp $       */
 
 /*-
- * Copyright (c) 1999
+ * Copyright (c) 1999, 2002
  *         Shin Takemura and PocketBSD Project. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -12,11 +12,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the PocketBSD project
- *     and its contributors.
- * 4. Neither the name of the project nor the names of its contributors
+ * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -46,6 +42,7 @@
 #include <machine/autoconf.h>
 #include <machine/platid.h>
 #include <machine/platid_mask.h>
+#include <machine/bitdisp.h>
 
 #include <hpcmips/vr/vr.h>
 #include <hpcmips/vr/vrcpudef.h>
@@ -69,6 +66,17 @@
 #define DDUMP_LEVEL2MASK(sc,arg)
 #endif
 
+struct vrip_softc {
+       struct  device sc_dv;
+       bus_space_tag_t sc_iot;
+       bus_space_handle_t sc_ioh;
+       hpcio_chip_t sc_gpio_chips[VRIP_NIOCHIPS];
+       vrcmu_chipset_tag_t sc_cc;
+       vrcmu_function_tag_t sc_cf;
+       int sc_pri; /* attaching device priority */
+       u_int32_t sc_intrmask;
+};
+
 int    vripmatch(struct device *, struct cfdata *, void *);
 void   vripattach(struct device *, struct device *, void *);
 int    vrip_print(void *, const char *);
@@ -110,38 +118,6 @@
 
 #define        LEGAL_LEVEL1(x) ((x) >= 0 && (x) < MAX_LEVEL1)
 
-void
-bitdisp16(u_int16_t a)
-{
-       u_int16_t j;
-
-       for (j = 0x8000; j > 0; j >>=1)
-               printf ("%c", a&j ?'|':'.');
-       printf ("\n");
-}
-
-void
-bitdisp32(u_int32_t a)
-{
-       u_int32_t j;
-
-       for (j = 0x80000000; j > 0; j >>=1)
-               printf ("%c" , a&j ? '|' : '.');
-       printf ("\n");
-}
-
-void
-bitdisp64(u_int32_t a[2])
-{
-       u_int32_t j;
-
-       for( j = 0x80000000 ; j > 0 ; j >>=1 )
-               printf("%c" , a[1]&j ?';':',' );
-       for( j = 0x80000000 ; j > 0 ; j >>=1 )
-               printf("%c" , a[0]&j ?'|':'.' );
-       printf("\n");
-}
-
 int
 vripmatch(struct device *parent, struct cfdata *match, void *aux)
 {
diff -r 439338153b61 -r 6b9bcaf64260 sys/arch/hpcmips/vr/vripvar.h
--- a/sys/arch/hpcmips/vr/vripvar.h     Sat Jan 26 10:24:58 2002 +0000
+++ b/sys/arch/hpcmips/vr/vripvar.h     Sat Jan 26 10:50:43 2002 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: vripvar.h,v 1.5 2001/09/16 05:32:21 uch Exp $  */
+/*     $NetBSD: vripvar.h,v 1.6 2002/01/26 10:50:44 takemura Exp $     */
 
 /*-
- * Copyright (c) 1999
+ * Copyright (c) 1999, 2002
  *         Shin Takemura and PocketBSD Project. All rights reserved.



Home | Main Index | Thread Index | Old Index