Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/dev ANSIfy, KNF, change my copyright.



details:   https://anonhg.NetBSD.org/src/rev/997fbaa10875
branches:  trunk
changeset: 514984:997fbaa10875
user:      uch <uch%NetBSD.org@localhost>
date:      Sat Sep 15 12:47:04 2001 +0000

description:
ANSIfy, KNF, change my copyright.

diffstat:

 sys/arch/hpcmips/dev/it8368.c        |  322 ++++++++++++++--------------------
 sys/arch/hpcmips/dev/it8368reg.h     |   44 ++-
 sys/arch/hpcmips/dev/it8368var.h     |   46 +++-
 sys/arch/hpcmips/dev/m38813c.c       |   68 +++----
 sys/arch/hpcmips/dev/m38813cvar.h    |   46 +++-
 sys/arch/hpcmips/dev/plum.c          |  119 ++++++------
 sys/arch/hpcmips/dev/plumicu.c       |   96 ++++-----
 sys/arch/hpcmips/dev/plumicureg.h    |   44 ++-
 sys/arch/hpcmips/dev/plumicuvar.h    |   50 +++--
 sys/arch/hpcmips/dev/plumiobus.c     |  100 +++++-----
 sys/arch/hpcmips/dev/plumiobusreg.h  |   45 +++-
 sys/arch/hpcmips/dev/plumiobusvar.h  |   44 ++-
 sys/arch/hpcmips/dev/plumohci.c      |  101 +++-------
 sys/arch/hpcmips/dev/plumohcireg.h   |   36 ++-
 sys/arch/hpcmips/dev/plumpcmcia.c    |  231 ++++++++++++------------
 sys/arch/hpcmips/dev/plumpcmciareg.h |   48 ++--
 sys/arch/hpcmips/dev/plumpower.c     |   24 +-
 sys/arch/hpcmips/dev/plumreg.h       |   45 +++-
 sys/arch/hpcmips/dev/plumvar.h       |   52 +++--
 sys/arch/hpcmips/dev/plumvideo.c     |   88 ++++----
 sys/arch/hpcmips/dev/tc5165buf.c     |   73 +++----
 sys/arch/hpcmips/dev/tc5165bufvar.h  |   47 +++-
 sys/arch/hpcmips/dev/ucb1200.c       |   59 +++--
 sys/arch/hpcmips/dev/ucb1200reg.h    |   38 ++-
 sys/arch/hpcmips/dev/ucbio.c         |    4 +-
 sys/arch/hpcmips/dev/ucbsnd.c        |  260 ++++++++++++----------------
 sys/arch/hpcmips/dev/ucbtp.c         |  124 +++++-------
 27 files changed, 1113 insertions(+), 1141 deletions(-)

diffs (truncated from 4803 to 300 lines):

diff -r 72515c9dc616 -r 997fbaa10875 sys/arch/hpcmips/dev/it8368.c
--- a/sys/arch/hpcmips/dev/it8368.c     Sat Sep 15 11:16:14 2001 +0000
+++ b/sys/arch/hpcmips/dev/it8368.c     Sat Sep 15 12:47:04 2001 +0000
@@ -1,30 +1,41 @@
-/*     $NetBSD: it8368.c,v 1.9 2001/05/08 18:08:02 uch Exp $ */
+/*     $NetBSD: it8368.c,v 1.10 2001/09/15 12:47:04 uch Exp $ */
 
-/*
- * Copyright (c) 1999, 2000, by UCHIYAMA Yasushi
+/*-
+ * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by UCHIYAMA Yasushi.
+ *
  * 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. The name of the developer may NOT be used to endorse or promote products
- *    derived from this software without specific prior written permission.
+ * 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 NetBSD
+ *        Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation 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 AUTHOR 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 AUTHOR 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.
- *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
  */
+
 #undef WINCE_DEFAULT_SETTING /* for debug */
 #undef IT8368DEBUG 
 #include "opt_tx39_debug.h"
@@ -54,10 +65,10 @@
 #define DPRINTFN(n, arg)
 #endif
 
-int    it8368e_match __P((struct device*, struct cfdata*, void*));
-void   it8368e_attach __P((struct device*, struct device*, void*));
-int    it8368_print __P((void*, const char*));
-int    it8368_submatch __P((struct device*, struct cfdata*, void*));
+int it8368e_match(struct device *, struct cfdata *, void *);
+void it8368e_attach(struct device *, struct device *, void *);
+int it8368_print(void *, const char *);
+int it8368_submatch(struct device *, struct cfdata *, void *);
 
 #define IT8368_LASTSTATE_PRESENT       0x0002
 #define IT8368_LASTSTATE_HALF          0x0001
@@ -87,7 +98,7 @@
        int sc_fixattr;
 
        /* Card interrupt handler */
-       int     (*sc_card_fun) __P((void*));
+       int     (*sc_card_fun)(void *);
        void    *sc_card_arg;
        void    *sc_card_ih;
        int     sc_card_irq;
@@ -98,35 +109,29 @@
        int     sc_laststate;
 };
 
-void   it8368_init_socket __P((struct it8368e_softc*));
-void   it8368_attach_socket __P((struct it8368e_softc*));
-int    it8368_intr __P((void*));
-int    it8368_chip_mem_alloc __P((pcmcia_chipset_handle_t, bus_size_t, 
-                                  struct pcmcia_mem_handle*));
-void   it8368_chip_mem_free __P((pcmcia_chipset_handle_t, 
-                                 struct pcmcia_mem_handle*));
-int    it8368_chip_mem_map __P((pcmcia_chipset_handle_t, int, bus_addr_t, 
-                                bus_size_t, struct pcmcia_mem_handle*, 
-                                bus_addr_t*, int*));
-void   it8368_chip_mem_unmap __P((pcmcia_chipset_handle_t, int));
-int    it8368_chip_io_alloc __P((pcmcia_chipset_handle_t, bus_addr_t, 
-                                 bus_size_t, bus_size_t, 
-                                 struct pcmcia_io_handle*));
-void   it8368_chip_io_free __P((pcmcia_chipset_handle_t, 
-                                struct pcmcia_io_handle*));
-int    it8368_chip_io_map __P((pcmcia_chipset_handle_t, int, bus_addr_t, 
-                               bus_size_t, struct pcmcia_io_handle*, 
-                               int*));
-void   it8368_chip_io_unmap __P((pcmcia_chipset_handle_t, int));
-void   it8368_chip_socket_enable __P((pcmcia_chipset_handle_t));
-void   it8368_chip_socket_disable __P((pcmcia_chipset_handle_t));
-void   *it8368_chip_intr_establish __P((pcmcia_chipset_handle_t, 
-                                        struct pcmcia_function*, int, 
-                                        int (*) (void*), void*));
-void   it8368_chip_intr_disestablish __P((pcmcia_chipset_handle_t, void*));
+void it8368_init_socket(struct it8368e_softc*);
+void it8368_attach_socket(struct it8368e_softc *);
+int it8368_intr(void *);
+int it8368_chip_mem_alloc(pcmcia_chipset_handle_t, bus_size_t, 
+    struct pcmcia_mem_handle *);
+void it8368_chip_mem_free(pcmcia_chipset_handle_t, struct pcmcia_mem_handle *);
+int it8368_chip_mem_map(pcmcia_chipset_handle_t, int, bus_addr_t, bus_size_t,
+    struct pcmcia_mem_handle *, bus_addr_t *, int *);
+void it8368_chip_mem_unmap(pcmcia_chipset_handle_t, int);
+int it8368_chip_io_alloc(pcmcia_chipset_handle_t, bus_addr_t, bus_size_t,
+    bus_size_t, struct pcmcia_io_handle *);
+void it8368_chip_io_free(pcmcia_chipset_handle_t, struct pcmcia_io_handle *);
+int it8368_chip_io_map(pcmcia_chipset_handle_t, int, bus_addr_t, bus_size_t,
+    struct pcmcia_io_handle *, int *);
+void it8368_chip_io_unmap(pcmcia_chipset_handle_t, int);
+void it8368_chip_socket_enable(pcmcia_chipset_handle_t);
+void it8368_chip_socket_disable(pcmcia_chipset_handle_t);
+void *it8368_chip_intr_establish(pcmcia_chipset_handle_t,
+    struct pcmcia_function *, int, int (*) (void *), void *);
+void it8368_chip_intr_disestablish(pcmcia_chipset_handle_t, void *);
 
 #ifdef IT8368DEBUG
-void   it8368_dump __P((struct it8368e_softc*));
+void it8368_dump(struct it8368e_softc *);
 #endif
 
 static struct pcmcia_chip_functions it8368_functions = {
@@ -151,21 +156,19 @@
 /*
  *     IT8368 configuration register is big-endian.
  */
-__inline__ u_int16_t   it8368_reg_read __P((bus_space_tag_t, 
-                                            bus_space_handle_t, int));
-__inline__ void                it8368_reg_write __P((bus_space_tag_t, 
-                                             bus_space_handle_t, int, 
-                                             u_int16_t));
+static __inline__ u_int16_t it8368_reg_read(bus_space_tag_t,
+    bus_space_handle_t, int);
+static __inline__ void it8368_reg_write(bus_space_tag_t, bus_space_handle_t,
+    int, u_int16_t);
 
 #ifdef IT8368E_DESTRUCTIVE_CHECK
-int    it8368e_id_check __P((void *));
+int    it8368e_id_check(void *);
 
 /*
  *     IT8368E don't have identification method. this is destructive check.
  */
 int
-it8368e_id_check(aux)
-       void *aux;
+it8368e_id_check(void *aux)
 {
        struct cs_attach_args *ca = aux;        
        tx_chipset_tag_t tc;
@@ -178,7 +181,7 @@
        csregt = ca->ca_csreg.cstag;
 
        bus_space_map(csregt, ca->ca_csreg.csbase, ca->ca_csreg.cssize,
-                     0, &csregh);
+           0, &csregh);
        reg = it8368_reg_read(csregt, csregh, IT8368_CTRL_REG);
        oreg = reg;
        bitdisp(reg);
@@ -205,10 +208,7 @@
 #endif /* IT8368E_DESTRUCTIVE_CHECK */
 
 int
-it8368e_match(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+it8368e_match(struct device *parent, struct cfdata *cf, void *aux)
 {
 #ifdef IT8368E_DESTRUCTIVE_CHECK
        return (it8368e_id_check(aux));
@@ -218,10 +218,7 @@
 }
 
 void
-it8368e_attach(parent, self, aux)
-       struct device *parent;
-       struct device *self;
-       void *aux;
+it8368e_attach(struct device *parent, struct device *self, void *aux)
 {
        struct cs_attach_args *ca = aux;
        struct it8368e_softc *sc = (void*)self;
@@ -234,7 +231,7 @@
        sc->sc_csregt = csregt = ca->ca_csreg.cstag;
        
        bus_space_map(csregt, ca->ca_csreg.csbase, ca->ca_csreg.cssize,
-                     0, &sc->sc_csregh);
+           0, &sc->sc_csregh);
        csregh = sc->sc_csregh;
        sc->sc_csiot = ca->ca_csio.cstag;
        sc->sc_csiobase = ca->ca_csio.csbase;
@@ -269,8 +266,8 @@
 
        /* Port direction */
        reg = IT8368_PIN_CRDVCCON1 | IT8368_PIN_CRDVCCON0 |
-               IT8368_PIN_CRDVPPON1 | IT8368_PIN_CRDVPPON0 |
-               IT8368_PIN_BCRDRST;
+           IT8368_PIN_CRDVPPON1 | IT8368_PIN_CRDVPPON0 |
+           IT8368_PIN_BCRDRST;
        it8368_reg_write(csregt, csregh, IT8368_GPIODIR_REG, reg);
        printf("\n");
 
@@ -313,23 +310,16 @@
 }
 
 __inline__ u_int16_t
-it8368_reg_read(t, h, ofs)
-       bus_space_tag_t t;
-       bus_space_handle_t h;
-       int ofs;
+it8368_reg_read(bus_space_tag_t t, bus_space_handle_t h, int ofs)
 {
        u_int16_t val;
 
        val = bus_space_read_2(t, h, ofs);
-       return 0xffff & (((val >> 8) & 0xff)|((val << 8) & 0xff00));
+       return (0xffff & (((val >> 8) & 0xff)|((val << 8) & 0xff00)));
 }
 
 __inline__ void
-it8368_reg_write(t, h, ofs, v)
-       bus_space_tag_t t;
-       bus_space_handle_t h;
-       int ofs;
-       u_int16_t v;
+it8368_reg_write(bus_space_tag_t t, bus_space_handle_t h, int ofs, u_int16_t v)
 {
        u_int16_t val;
 
@@ -338,8 +328,7 @@
 }
 
 int
-it8368_intr(arg)
-       void *arg;
+it8368_intr(void *arg)
 {
        struct it8368e_softc *sc = arg;
        bus_space_tag_t csregt = sc->sc_csregt;
@@ -352,15 +341,15 @@
                if (sc->sc_card_fun) {
                        /* clear interrupt */
                        it8368_reg_write(csregt, csregh, 
-                                        IT8368_GPIONEGINTSTAT_REG,
-                                        IT8368_PIN_BCRDRDY);
+                           IT8368_GPIONEGINTSTAT_REG,
+                           IT8368_PIN_BCRDRDY);
                        
                        /* Dispatch card interrupt handler */
                        (*sc->sc_card_fun)(sc->sc_card_arg);
                }
        } else if (reg & IT8368_PIN_CRDDET2) {
                it8368_reg_write(csregt, csregh, IT8368_GPIONEGINTSTAT_REG,
-                                IT8368_PIN_CRDDET2);
+                   IT8368_PIN_CRDDET2);
                printf("[CSC]\n");
 #ifdef IT8368DEBUG
                it8368_dump(sc);
@@ -373,36 +362,31 @@
                printf("unknown it8368 interrupt: ");
                bitdisp(reg2);
                it8368_reg_write(csregt, csregh, IT8368_GPIONEGINTSTAT_REG,
-                                reg);
+                   reg);
 #endif
        }
 
-       return 0;
+       return (0);
 }
 
 int
-it8368_print(arg, pnp)
-       void *arg;
-       const char *pnp;
+it8368_print(void *arg, const char *pnp)
 {
        if (pnp)



Home | Main Index | Thread Index | Old Index