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?
This commit is contained in:
parent
7fdc59f9fc
commit
d79f4782b6
@ -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 @@ struct cdevsw cdevsw[] = {
|
||||
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 */
|
||||
|
@ -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 {md = 18}
|
||||
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 @@ file arch/arm/iomd/qms_iomd.c qms_iomd
|
||||
|
||||
# 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
|
||||
|
@ -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(vidcconsole);
|
||||
cdev_decl(com);
|
||||
cdev_decl(lpt);
|
||||
cdev_decl(qms);
|
||||
cdev_decl(pms);
|
||||
cdev_decl(opms);
|
||||
cdev_decl(beep);
|
||||
cdev_decl(kbd);
|
||||
cdev_decl(iic);
|
||||
|
@ -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 */
|
||||
|
@ -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 @@ struct cdevsw cdevsw[] = {
|
||||
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 */
|
||||
|
@ -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(biconsdev);
|
||||
cdev_decl(com);
|
||||
cdev_decl(lpt);
|
||||
cdev_decl(qms);
|
||||
cdev_decl(pms);
|
||||
cdev_decl(opms);
|
||||
cdev_decl(beep);
|
||||
cdev_decl(kbd);
|
||||
cdev_decl(iic);
|
||||
|
@ -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 @@ iomdattach(parent, self, aux)
|
||||
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:
|
||||
|
@ -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 @@ struct qms_attach_args {
|
||||
};
|
||||
|
||||
/*
|
||||
* 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 @@ struct iic_attach_args {
|
||||
|
||||
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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pms.c,v 1.2 2002/02/18 18:58:47 bjh21 Exp $ */
|
||||
/* $NetBSD: opms.c,v 1.1 2002/04/19 01:04:39 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 D.C. Tsen
|
||||
@ -31,7 +31,7 @@
|
||||
* (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
|
||||
* from: pms.c,v 1.24 1995/12/24 02:30:28 mycroft Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__RCSID("$NetBSD: pms.c,v 1.2 2002/02/18 18:58:47 bjh21 Exp $");
|
||||
__RCSID("$NetBSD: opms.c,v 1.1 2002/04/19 01:04:39 wiz Exp $");
|
||||
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/systm.h>
|
||||
@ -60,7 +60,7 @@ __RCSID("$NetBSD: pms.c,v 1.2 2002/02/18 18:58:47 bjh21 Exp $");
|
||||
#include <machine/bus.h>
|
||||
#include <machine/conf.h>
|
||||
#include <machine/mouse.h>
|
||||
#include <arm/iomd/pmsvar.h>
|
||||
#include <arm/iomd/opmsvar.h>
|
||||
|
||||
#define MOUSE_IOC_ACK
|
||||
|
||||
@ -80,16 +80,16 @@ __RCSID("$NetBSD: pms.c,v 1.2 2002/02/18 18:58:47 bjh21 Exp $");
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
void pmswatchdog __P((void *));
|
||||
void opmswatchdog __P((void *));
|
||||
#ifdef MOUSE_IOC_ACK
|
||||
static void pmsputbuffer __P((struct pms_softc *sc, struct mousebufrec *buf));
|
||||
static void opmsputbuffer __P((struct opms_softc *sc, struct mousebufrec *buf));
|
||||
#endif
|
||||
static __inline void pms_flush __P((struct pms_softc *sc));
|
||||
static int cmd_mouse __P((struct pms_softc *, u_char));
|
||||
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;
|
||||
|
||||
/* pms device driver structure */
|
||||
/* opms device driver structure */
|
||||
|
||||
#define PMS_DATA 0
|
||||
#define PMS_CR 1
|
||||
@ -115,8 +115,8 @@ extern struct cfdriver opms_cd;
|
||||
*/
|
||||
|
||||
static __inline void
|
||||
pms_flush(sc)
|
||||
struct pms_softc *sc;
|
||||
opms_flush(sc)
|
||||
struct opms_softc *sc;
|
||||
{
|
||||
int n = 1000;
|
||||
|
||||
@ -137,7 +137,7 @@ pms_flush(sc)
|
||||
|
||||
static int
|
||||
cmd_mouse(sc, cmd)
|
||||
struct pms_softc * sc;
|
||||
struct opms_softc * sc;
|
||||
u_char cmd;
|
||||
{
|
||||
int c;
|
||||
@ -169,7 +169,7 @@ resend:
|
||||
return(0);
|
||||
|
||||
if (--retry) {
|
||||
pms_flush(sc);
|
||||
opms_flush(sc);
|
||||
goto resend;
|
||||
}
|
||||
|
||||
@ -187,8 +187,8 @@ resend:
|
||||
*/
|
||||
|
||||
int
|
||||
pmsinit(sc)
|
||||
struct pms_softc *sc;
|
||||
opmsinit(sc)
|
||||
struct opms_softc *sc;
|
||||
{
|
||||
int i, j;
|
||||
int mid;
|
||||
@ -216,12 +216,12 @@ pmsinit(sc)
|
||||
PMS_STATUS));
|
||||
return(0);
|
||||
}
|
||||
pms_flush(sc);
|
||||
opms_flush(sc);
|
||||
delay(2);
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh, PMS_CR, PMS_CR_ENABLE);
|
||||
}
|
||||
|
||||
pms_flush(sc);
|
||||
opms_flush(sc);
|
||||
|
||||
/*
|
||||
* Disable, reset and enable the mouse.
|
||||
@ -239,7 +239,7 @@ pmsinit(sc)
|
||||
printf("Mouse Reset failed, status = <%x>.\n", mid);
|
||||
return(0);
|
||||
}
|
||||
pms_flush(sc);
|
||||
opms_flush(sc);
|
||||
cmd_mouse(sc, PMS_RESET);
|
||||
i = 0;
|
||||
}
|
||||
@ -262,14 +262,14 @@ pmsinit(sc)
|
||||
* device open routine
|
||||
*/
|
||||
int
|
||||
pmsopen(dev, flag, mode, p)
|
||||
opmsopen(dev, flag, mode, p)
|
||||
dev_t dev;
|
||||
int flag;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
int unit = PMSUNIT(dev);
|
||||
struct pms_softc *sc;
|
||||
struct opms_softc *sc;
|
||||
|
||||
/* validate the unit and the softc */
|
||||
if (unit >= opms_cd.cd_ndevs)
|
||||
@ -301,7 +301,7 @@ pmsopen(dev, flag, mode, p)
|
||||
|
||||
/* install watchdog timeout */
|
||||
callout_reset(&sc->sc_watchdog_ch, 30 * hz,
|
||||
pmswatchdog, sc);
|
||||
opmswatchdog, sc);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@ -310,13 +310,13 @@ pmsopen(dev, flag, mode, p)
|
||||
* driver close function
|
||||
*/
|
||||
int
|
||||
pmsclose(dev, flag, mode, p)
|
||||
opmsclose(dev, flag, mode, p)
|
||||
dev_t dev;
|
||||
int flag;
|
||||
int mode;
|
||||
struct proc *p;
|
||||
{
|
||||
struct pms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
struct opms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
|
||||
/* remove the timeout */
|
||||
callout_stop(&sc->sc_watchdog_ch);
|
||||
@ -335,12 +335,12 @@ pmsclose(dev, flag, mode, p)
|
||||
}
|
||||
|
||||
int
|
||||
pmsread(dev, uio, flag)
|
||||
opmsread(dev, uio, flag)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flag;
|
||||
{
|
||||
struct pms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
struct opms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
int s;
|
||||
int error = 0;
|
||||
size_t length;
|
||||
@ -355,7 +355,7 @@ pmsread(dev, uio, flag)
|
||||
return EWOULDBLOCK;
|
||||
}
|
||||
sc->sc_state |= PMS_ASLP;
|
||||
if ((error = tsleep((caddr_t)sc, (PZERO | PCATCH), "pmsread", 0))) {
|
||||
if ((error = tsleep((caddr_t)sc, (PZERO | PCATCH), "opmsread", 0))) {
|
||||
sc->sc_state &= ~PMS_ASLP;
|
||||
(void)splx(s);
|
||||
return error;
|
||||
@ -382,14 +382,14 @@ pmsread(dev, uio, flag)
|
||||
}
|
||||
|
||||
int
|
||||
pmsioctl(dev, cmd, addr, flag, p)
|
||||
opmsioctl(dev, cmd, addr, flag, p)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t addr;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
{
|
||||
struct pms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
struct opms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
struct mouseinfo info;
|
||||
int s;
|
||||
int error = 0;
|
||||
@ -418,7 +418,7 @@ pmsioctl(dev, cmd, addr, flag, p)
|
||||
buffer.x = sc->origx;
|
||||
buffer.y = sc->origy;
|
||||
#ifdef MOUSE_IOC_ACK
|
||||
pmsputbuffer(sc, &buffer);
|
||||
opmsputbuffer(sc, &buffer);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -434,7 +434,7 @@ pmsioctl(dev, cmd, addr, flag, p)
|
||||
if (sc->sc_q.c_cc > 0)
|
||||
printf("%s: setting mode with non empty buffer (%d)\n",
|
||||
sc->sc_dev.dv_xname, sc->sc_q.c_cc);
|
||||
pmsputbuffer(sc, &buffer);
|
||||
opmsputbuffer(sc, &buffer);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -450,7 +450,7 @@ pmsioctl(dev, cmd, addr, flag, p)
|
||||
buffer.x = sc->origx;
|
||||
buffer.y = sc->origy;
|
||||
#ifdef MOUSE_IOC_ACK
|
||||
pmsputbuffer(sc, &buffer);
|
||||
opmsputbuffer(sc, &buffer);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -518,10 +518,10 @@ pmsioctl(dev, cmd, addr, flag, p)
|
||||
#define YNEG_MASK 0x20
|
||||
|
||||
int
|
||||
pmsintr(arg)
|
||||
opmsintr(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct pms_softc *sc = arg;
|
||||
struct opms_softc *sc = arg;
|
||||
static int state = 0;
|
||||
static u_char buttons;
|
||||
u_char changed;
|
||||
@ -533,7 +533,7 @@ pmsintr(arg)
|
||||
|
||||
if ((sc->sc_state & PMS_OPEN) == 0) {
|
||||
/* Interrupts are not expected. Discard the byte. */
|
||||
pms_flush(sc);
|
||||
opms_flush(sc);
|
||||
return(-1); /* Could have been ours but pass it on */
|
||||
}
|
||||
|
||||
@ -626,12 +626,12 @@ pmsintr(arg)
|
||||
|
||||
|
||||
int
|
||||
pmspoll(dev, events, p)
|
||||
opmspoll(dev, events, p)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
{
|
||||
struct pms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
struct opms_softc *sc = opms_cd.cd_devs[PMSUNIT(dev)];
|
||||
int revents = 0;
|
||||
int s = spltty();
|
||||
|
||||
@ -648,10 +648,10 @@ pmspoll(dev, events, p)
|
||||
|
||||
|
||||
void
|
||||
pmswatchdog(arg)
|
||||
opmswatchdog(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct pms_softc *sc = arg;
|
||||
struct opms_softc *sc = arg;
|
||||
int s;
|
||||
|
||||
if ((bus_space_read_1(sc->sc_iot, sc->sc_ioh, PMS_STATUS) & 0x03)
|
||||
@ -660,15 +660,15 @@ pmswatchdog(arg)
|
||||
sc->sc_dev.dv_xname, bus_space_read_1(sc->sc_iot,
|
||||
sc->sc_ioh, PMS_STATUS));
|
||||
s = spltty();
|
||||
pmsinit(sc);
|
||||
opmsinit(sc);
|
||||
(void)splx(s);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOUSE_IOC_ACK
|
||||
static void
|
||||
pmsputbuffer(sc, buffer)
|
||||
struct pms_softc *sc;
|
||||
opmsputbuffer(sc, buffer)
|
||||
struct opms_softc *sc;
|
||||
struct mousebufrec *buffer;
|
||||
{
|
||||
int s;
|
||||
@ -695,4 +695,4 @@ pmsputbuffer(sc, buffer)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* End of pms.c */
|
||||
/* End of opms.c */
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pms_iomd.c,v 1.2 2001/11/27 01:03:53 thorpej Exp $ */
|
||||
/* $NetBSD: opms_iomd.c,v 1.1 2002/04/19 01:04:40 wiz Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 D.C. Tsen
|
||||
@ -31,7 +31,7 @@
|
||||
* (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
|
||||
* from: opms.c,v 1.24 1995/12/24 02:30:28 mycroft Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,44 +52,44 @@
|
||||
#include <machine/bus.h>
|
||||
#include <machine/intr.h>
|
||||
#include <arm/iomd/iomdvar.h>
|
||||
#include <arm/iomd/pmsvar.h>
|
||||
#include <arm/iomd/opmsvar.h>
|
||||
|
||||
static int pms_iomd_probe __P((struct device *, struct cfdata *, void *));
|
||||
static void pms_iomd_attach __P((struct device *, struct device *, void *));
|
||||
static void pms_iomd_intenable __P((struct pms_softc *sc, int enable));
|
||||
static int opms_iomd_probe __P((struct device *, struct cfdata *, void *));
|
||||
static void opms_iomd_attach __P((struct device *, struct device *, void *));
|
||||
static void opms_iomd_intenable __P((struct opms_softc *sc, int enable));
|
||||
|
||||
struct cfattach opms_iomd_ca = {
|
||||
sizeof(struct pms_softc), pms_iomd_probe, pms_iomd_attach
|
||||
sizeof(struct opms_softc), opms_iomd_probe, opms_iomd_attach
|
||||
};
|
||||
|
||||
static int
|
||||
pms_iomd_probe(parent, cf, aux)
|
||||
opms_iomd_probe(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
{
|
||||
struct pms_attach_args *pa = aux;
|
||||
struct opms_attach_args *pa = aux;
|
||||
|
||||
if (strcmp(pa->pa_name, "pms") == 0)
|
||||
if (strcmp(pa->pa_name, "opms") == 0)
|
||||
return(1);
|
||||
|
||||
return(0);
|
||||
}
|
||||
static void
|
||||
pms_iomd_attach(parent, self, aux)
|
||||
opms_iomd_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
{
|
||||
struct pms_softc *sc = (void *)self;
|
||||
struct pms_attach_args *pa = aux;
|
||||
struct opms_softc *sc = (void *)self;
|
||||
struct opms_attach_args *pa = aux;
|
||||
|
||||
sc->sc_iot = pa->pa_iot;
|
||||
sc->sc_ioh = pa->pa_ioh;
|
||||
sc->sc_irqnum = pa->pa_irq;
|
||||
|
||||
sc->sc_intenable = pms_iomd_intenable;
|
||||
sc->sc_intenable = opms_iomd_intenable;
|
||||
|
||||
if (pmsinit(sc) != 1) {
|
||||
if (opmsinit(sc) != 1) {
|
||||
printf("Mouse not present\n");
|
||||
}
|
||||
|
||||
@ -97,12 +97,12 @@ pms_iomd_attach(parent, self, aux)
|
||||
}
|
||||
|
||||
static void
|
||||
pms_iomd_intenable(sc, enable)
|
||||
struct pms_softc *sc;
|
||||
opms_iomd_intenable(sc, enable)
|
||||
struct opms_softc *sc;
|
||||
int enable;
|
||||
{
|
||||
if (enable) {
|
||||
sc->sc_ih = intr_claim(sc->sc_irqnum, IPL_TTY, "pms", pmsintr, sc);
|
||||
sc->sc_ih = intr_claim(sc->sc_irqnum, IPL_TTY, "opms", opmsintr, sc);
|
||||
if (!sc->sc_ih)
|
||||
panic("%s: Cannot claim interrupt\n", sc->sc_dev.dv_xname);
|
||||
} else {
|
||||
@ -111,4 +111,4 @@ pms_iomd_intenable(sc, enable)
|
||||
}
|
||||
}
|
||||
|
||||
/* End of pms_iomd.c */
|
||||
/* End of opms_iomd.c */
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmsvar.h,v 1.1 2001/10/05 22:27:42 reinoud Exp $ */
|
||||
/* $NetBSD: opmsvar.h,v 1.1 2002/04/19 01:04:40 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -34,18 +34,18 @@
|
||||
*
|
||||
* RiscBSD kernel project
|
||||
*
|
||||
* pmsvar.h
|
||||
* opmsvar.h
|
||||
*
|
||||
* Created : 02/02/97
|
||||
*/
|
||||
|
||||
/*
|
||||
* softc structure for the pms device
|
||||
* softc structure for the opms device
|
||||
*/
|
||||
|
||||
#include <sys/callout.h>
|
||||
|
||||
struct pms_softc {
|
||||
struct opms_softc {
|
||||
struct device sc_dev; /* device node */
|
||||
void *sc_ih; /* interrupt pointer */
|
||||
bus_space_tag_t sc_iot; /* bus tag */
|
||||
@ -54,7 +54,7 @@ struct pms_softc {
|
||||
|
||||
struct callout sc_watchdog_ch;
|
||||
|
||||
void (*sc_intenable) __P((struct pms_softc *, int));
|
||||
void (*sc_intenable) __P((struct opms_softc *, int));
|
||||
|
||||
struct proc *sc_proc;
|
||||
struct clist sc_q;
|
||||
@ -72,7 +72,7 @@ struct pms_softc {
|
||||
|
||||
/* function prototypes used by attach routines */
|
||||
|
||||
int pmsintr __P((void *));
|
||||
int pmsinit __P((struct pms_softc *));
|
||||
int opmsintr __P((void *));
|
||||
int opmsinit __P((struct opms_softc *));
|
||||
|
||||
/* End of pmsvar.h */
|
||||
/* End of opmsvar.h */
|
Loading…
Reference in New Issue
Block a user