Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Complete renaming of opms to opms (was partly named...



details:   https://anonhg.NetBSD.org/src/rev/2c0778721036
branches:  trunk
changeset: 525868:2c0778721036
user:      wiz <wiz%NetBSD.org@localhost>
date:      Fri Apr 19 01:04:38 2002 +0000

description:
Complete renaming of opms to opms (was partly named pms, externally and
internally).  Move arm/iomd/pms* to arm/iomd/opms*. Mechanical change,
tested by cross-compiling a kernel from i386.

Approved by christos.

XXX: What are arm/arm32/conf.c and arm/include/conf.h good for?

diffstat:

 sys/arch/acorn32/acorn32/conf.c     |    4 +-
 sys/arch/acorn32/conf/files.acorn32 |    8 +-
 sys/arch/acorn32/include/conf.h     |    4 +-
 sys/arch/acorn32/include/mouse.h    |    4 +-
 sys/arch/arm/arm32/conf.c           |    4 +-
 sys/arch/arm/include/conf.h         |    4 +-
 sys/arch/arm/iomd/iomd.c            |   14 +-
 sys/arch/arm/iomd/iomdvar.h         |    8 +-
 sys/arch/arm/iomd/opms.c            |  698 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm/iomd/opms_iomd.c       |  114 +++++
 sys/arch/arm/iomd/opmsvar.h         |   78 ++++
 sys/arch/arm/iomd/pms.c             |  698 ------------------------------------
 sys/arch/arm/iomd/pms_iomd.c        |  114 -----
 sys/arch/arm/iomd/pmsvar.h          |   78 ----
 14 files changed, 915 insertions(+), 915 deletions(-)

diffs (truncated from 1985 to 300 lines):

diff -r 0b193bacf551 -r 2c0778721036 sys/arch/acorn32/acorn32/conf.c
--- a/sys/arch/acorn32/acorn32/conf.c   Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/acorn32/acorn32/conf.c   Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.4 2002/03/16 16:55:51 martin Exp $  */
+/*     $NetBSD: conf.c,v 1.5 2002/04/19 01:04:42 wiz Exp $     */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -252,7 +252,7 @@
        cdev_vidcvid_init(NVIDCCONSOLE,vidcconsole),    /* 37: vidcconsole device */
        cdev_lkm_dummy(),               /* 38: removed cpu device */
        cdev_lkm_dummy(),               /* 39: reserved */
-       cdev_mouse_init(NOPMS,pms),     /* 40: PS2 mouse driver */
+       cdev_mouse_init(NOPMS,opms),    /* 40: PS2 mouse driver */
        cdev_lkm_dummy(),               /* 41: reserved */
        cdev_iic_init(NIIC, iic),       /* 42: IIC bus driver */
        cdev_rtc_init(NRTC, rtc),       /* 43: RTC driver */
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/acorn32/conf/files.acorn32
--- a/sys/arch/acorn32/conf/files.acorn32       Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/acorn32/conf/files.acorn32       Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.acorn32,v 1.9 2002/04/11 17:31:23 bjh21 Exp $
+#      $NetBSD: files.acorn32,v 1.10 2002/04/19 01:04:42 wiz Exp $
 #
 # First try for arm-specific configuration info
 #
@@ -66,7 +66,7 @@
 major  {raid = 71}
 
 # IOMD device
-# parent to kbd, qms, pms, iic
+# parent to kbd, qms, opms, iic
 # also provides irq and timer services
 device iomd {}
 attach iomd at mainbus
@@ -111,10 +111,10 @@
 
 # PS/2 mouse device
 device opms: tty
-file   arch/arm/iomd/pms.c                     opms & opms_iomd needs-flag
+file   arch/arm/iomd/opms.c                    opms & opms_iomd needs-flag
 
 attach opms at iomd with opms_iomd
-file   arch/arm/iomd/pms_iomd.c                opms_iomd
+file   arch/arm/iomd/opms_iomd.c               opms_iomd
 
 # Standard keyboard driver (obsolete ... old vidc console)
 device kbd
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/acorn32/include/conf.h
--- a/sys/arch/acorn32/include/conf.h   Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/acorn32/include/conf.h   Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.h,v 1.3 2002/02/28 03:17:23 simonb Exp $  */
+/*     $NetBSD: conf.h,v 1.4 2002/04/19 01:04:42 wiz Exp $     */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -81,7 +81,7 @@
 cdev_decl(com);
 cdev_decl(lpt);
 cdev_decl(qms);
-cdev_decl(pms);
+cdev_decl(opms);
 cdev_decl(beep);
 cdev_decl(kbd);
 cdev_decl(iic);
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/acorn32/include/mouse.h
--- a/sys/arch/acorn32/include/mouse.h  Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/acorn32/include/mouse.h  Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mouse.h,v 1.1 2001/10/05 22:27:51 reinoud Exp $        */
+/*     $NetBSD: mouse.h,v 1.2 2002/04/19 01:04:42 wiz Exp $    */
 
 /*
  * Copyright (c) Mark Brinicombe 1996 All rights reserved
@@ -37,7 +37,7 @@
 #define MOUSE_BUTTON_LEFT   0x40
 */
 
-/* Used in pms.c */
+/* Used in opms.c */
 
 #define BUTSTATMASK    0x07    /* Any mouse button down if any bit set */
 #define BUTCHNGMASK    0x38    /* Any mouse button changed if any bit set */
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/arm/arm32/conf.c
--- a/sys/arch/arm/arm32/conf.c Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/arm/arm32/conf.c Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.9 2002/03/18 22:46:57 briggs Exp $  */
+/*     $NetBSD: conf.c,v 1.10 2002/04/19 01:04:38 wiz Exp $    */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -442,7 +442,7 @@
        cdev_vidcvid_init(NVIDCCONSOLE,vidcconsole),    /* 37: vidcconsole device */
        cdev_notdef(),                          /* 38: removed cpu device */
        cdev_lkm_dummy(),                       /* 39: reserved */
-       cdev_mouse_init(NOPMS,pms),             /* 40: PS2 mouse driver */
+       cdev_mouse_init(NOPMS,opms),            /* 40: PS2 mouse driver */
        cdev_lkm_dummy(),                       /* 41: reserved */
        cdev_iic_init(NIIC,iic),                /* 42: IIC bus driver */
        cdev_rtc_init(NRTC,rtc),                /* 43: RTC driver */
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/arm/include/conf.h
--- a/sys/arch/arm/include/conf.h       Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/arm/include/conf.h       Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.h,v 1.6 2002/02/28 03:17:25 simonb Exp $  */
+/*     $NetBSD: conf.h,v 1.7 2002/04/19 01:04:39 wiz Exp $     */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -86,7 +86,7 @@
 cdev_decl(com);
 cdev_decl(lpt);
 cdev_decl(qms);
-cdev_decl(pms);
+cdev_decl(opms);
 cdev_decl(beep);
 cdev_decl(kbd);
 cdev_decl(iic);
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/arm/iomd/iomd.c
--- a/sys/arch/arm/iomd/iomd.c  Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/arm/iomd/iomd.c  Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iomd.c,v 1.2 2001/11/27 01:03:52 thorpej Exp $ */
+/*     $NetBSD: iomd.c,v 1.3 2002/04/19 01:04:39 wiz Exp $     */
 
 /*
  * Copyright (c) 1996-1997 Mark Brinicombe.
@@ -285,13 +285,13 @@
        switch (sc->sc_id) {
        case ARM7500_IOC_ID:
        case ARM7500FE_IOC_ID:
-               /* Attach pms device */
+               /* Attach opms device */
 
-               if (bus_space_subregion(iot, ioh, IOMD_MSDATA, 8, &ia.ia_pms.pa_ioh))
-                       panic("%s: Cannot map pms registers\n", self->dv_xname);
-               ia.ia_pms.pa_name = "pms";
-               ia.ia_pms.pa_iot = iot;
-               ia.ia_pms.pa_irq = IRQ_MSDRX;
+               if (bus_space_subregion(iot, ioh, IOMD_MSDATA, 8, &ia.ia_opms.pa_ioh))
+                       panic("%s: Cannot map opms registers\n", self->dv_xname);
+               ia.ia_opms.pa_name = "opms";
+               ia.ia_opms.pa_iot = iot;
+               ia.ia_opms.pa_irq = IRQ_MSDRX;
                config_found(self, &ia, iomdprint);
                break;
        case RPC600_IOMD_ID:
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/arm/iomd/iomdvar.h
--- a/sys/arch/arm/iomd/iomdvar.h       Fri Apr 19 00:55:31 2002 +0000
+++ b/sys/arch/arm/iomd/iomdvar.h       Fri Apr 19 01:04:38 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iomdvar.h,v 1.1 2001/10/05 22:27:41 reinoud Exp $      */
+/*     $NetBSD: iomdvar.h,v 1.2 2002/04/19 01:04:39 wiz Exp $  */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -70,10 +70,10 @@
 };
 
 /*
- * Attach args for pms device
+ * Attach args for opms device
  */
 
-struct pms_attach_args {
+struct opms_attach_args {
        const char              *pa_name;       /* device name*/
        bus_space_tag_t         pa_iot;         /* Bus tag */
        bus_space_handle_t      pa_ioh;         /* Bus handle */
@@ -110,7 +110,7 @@
 
 union iomd_attach_args {
        struct kbd_attach_args          ia_kbd;
-       struct pms_attach_args          ia_pms;
+       struct opms_attach_args         ia_opms;
        struct qms_attach_args          ia_qms;
        struct iic_attach_args          ia_iic;
        struct clk_attach_args          ia_clk;
diff -r 0b193bacf551 -r 2c0778721036 sys/arch/arm/iomd/opms.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/iomd/opms.c  Fri Apr 19 01:04:38 2002 +0000
@@ -0,0 +1,698 @@
+/*     $NetBSD: opms.c,v 1.1 2002/04/19 01:04:39 wiz Exp $     */
+
+/*-
+ * Copyright (c) 1996 D.C. Tsen
+ * Copyright (c) 1994 Charles M. Hannum.
+ * Copyright (c) 1992, 1993 Erik Forsberg.
+ * 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. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the RiscBSD team.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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.
+ *
+ *     from: pms.c,v 1.24 1995/12/24 02:30:28 mycroft Exp
+ */
+
+/*
+ * Ported from 386 version of PS/2 mouse driver.
+ * D.C. Tsen
+ */
+
+#include <sys/param.h>
+
+__RCSID("$NetBSD: opms.c,v 1.1 2002/04/19 01:04:39 wiz Exp $");
+
+#include <sys/kernel.h>
+#include <sys/systm.h>
+#include <sys/buf.h>
+#include <sys/malloc.h>
+#include <sys/ioctl.h>
+#include <sys/tty.h>
+#include <sys/file.h>
+#include <sys/select.h>
+#include <sys/proc.h>
+#include <sys/signalvar.h>
+#include <sys/vnode.h>
+#include <sys/device.h>
+#include <sys/poll.h>
+
+#include <machine/bus.h>
+#include <machine/conf.h>
+#include <machine/mouse.h>
+#include <arm/iomd/opmsvar.h>
+
+#define MOUSE_IOC_ACK
+
+/* mouse commands */
+#define        PMS_SET_SCALE11 0xe6    /* set scaling 1:1 */
+#define        PMS_SET_SCALE21 0xe7    /* set scaling 2:1 */
+#define        PMS_SET_RES     0xe8    /* set resolution */
+#define        PMS_GET_SCALE   0xe9    /* get scaling factor */
+#define        PMS_SET_STREAM  0xea    /* set streaming mode */
+#define        PMS_SET_SAMPLE  0xf3    /* set sampling rate */
+#define        PMS_DEV_ENABLE  0xf4    /* mouse on */
+#define        PMS_DEV_DISABLE 0xf5    /* mouse off */
+#define        PMS_RESET       0xff    /* reset */
+
+#define        PMS_CHUNK       128     /* chunk size for read */
+#define        PMS_BSIZE       (20*64) /* buffer size */
+
+/* function prototypes */
+
+void opmswatchdog      __P((void *));
+#ifdef MOUSE_IOC_ACK
+static void opmsputbuffer __P((struct opms_softc *sc, struct mousebufrec *buf));
+#endif
+static __inline void opms_flush __P((struct opms_softc *sc));
+static int cmd_mouse __P((struct opms_softc *, u_char));
+
+extern struct cfdriver opms_cd;
+
+/* opms device driver structure */
+
+#define PMS_DATA       0
+#define PMS_CR         1
+#define PMS_STATUS     1
+
+#define PMS_CR_ENABLE  0x08
+#define PMS_CR_KDATAO  0x02
+#define PMS_CR_KCLKO   0x01
+
+#define PMS_ST_TXE     0x80
+#define PMS_ST_TXB     0x40
+#define PMS_ST_RXF     0x20
+#define PMS_ST_RXB     0x10
+#define PMS_ST_ENABLE  0x08
+#define PMS_ST_RXPARITY        0x04
+#define PMS_ST_KDATAI  0x02
+#define PMS_ST_KCLKI   0x01
+
+#define        PMSUNIT(dev)    (minor(dev))
+
+/*
+ * Flush any pending mouse data
+ */



Home | Main Index | Thread Index | Old Index