summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-04-28 15:17:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-04-28 15:17:10 +0000
commit1ac9a556597ce64c5abec60c16f447023193bf93 (patch)
tree19969f7eaa579380bb53d480af3eaaff4d1e0c3c /sys/arch
parent2d3e356666ed15077c646db498b8315e158ec3bf (diff)
Use the prototypes defined via cdev_decl() macros, instead of rolling our
own; thus fix a lot of foo_open(), foo_close() and foo_ioctl() prototypes in the process.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/hp300/mem.c16
-rw-r--r--sys/arch/mvme88k/dev/bugtty.c18
-rw-r--r--sys/arch/mvme88k/dev/cl.c100
-rw-r--r--sys/arch/mvme88k/dev/dart.c14
-rw-r--r--sys/arch/mvme88k/dev/if_ve.c6
-rw-r--r--sys/arch/mvme88k/dev/nvram.c24
-rw-r--r--sys/arch/mvme88k/dev/nvramreg.h5
-rw-r--r--sys/arch/mvme88k/dev/sram.c20
-rw-r--r--sys/arch/mvme88k/dev/vmel.c24
-rw-r--r--sys/arch/mvme88k/dev/vmes.c22
-rw-r--r--sys/arch/mvme88k/dev/vx.c14
-rw-r--r--sys/arch/mvme88k/include/conf.h45
-rw-r--r--sys/arch/mvme88k/mvme88k/conf.c31
-rw-r--r--sys/arch/mvme88k/mvme88k/mem.c16
14 files changed, 186 insertions, 169 deletions
diff --git a/sys/arch/hp300/hp300/mem.c b/sys/arch/hp300/hp300/mem.c
index ad6006cc4fa..805a218c78b 100644
--- a/sys/arch/hp300/hp300/mem.c
+++ b/sys/arch/hp300/hp300/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.19 2002/03/14 01:26:31 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.20 2002/04/28 15:17:07 miod Exp $ */
/* $NetBSD: mem.c,v 1.25 1999/03/27 00:30:06 mycroft Exp $ */
/*
@@ -61,17 +61,16 @@ extern u_int lowram;
extern char *extiobase;
static caddr_t devzeropage;
-int mmopen(dev_t, int, int);
-int mmclose(dev_t, int, int);
-int mmrw(dev_t, struct uio *, int);
-paddr_t mmmmap(dev_t, off_t, int);
-int mmioctl(dev_t, u_long, caddr_t, int, struct proc *);
+#define mmread mmrw
+#define mmwrite mmrw
+cdev_decl(mm);
/*ARGSUSED*/
int
-mmopen(dev, flag, mode)
+mmopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
switch (minor(dev)) {
@@ -87,9 +86,10 @@ mmopen(dev, flag, mode)
/*ARGSUSED*/
int
-mmclose(dev, flag, mode)
+mmclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
return (0);
diff --git a/sys/arch/mvme88k/dev/bugtty.c b/sys/arch/mvme88k/dev/bugtty.c
index a4a01d6b9a4..23cecb7a69e 100644
--- a/sys/arch/mvme88k/dev/bugtty.c
+++ b/sys/arch/mvme88k/dev/bugtty.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: bugtty.c,v 1.11 2002/03/14 01:26:39 millert Exp $ */
+/* $OpenBSD: bugtty.c,v 1.12 2002/04/28 15:17:09 miod Exp $ */
+
/* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
* All rights reserved.
@@ -35,13 +36,13 @@
#include <sys/device.h>
#include <sys/tty.h>
#include <sys/proc.h>
-#include <sys/conf.h>
#include <sys/uio.h>
#include <sys/queue.h>
#include <dev/cons.h>
#include <machine/autoconf.h>
#include <machine/bugio.h>
+#include <machine/conf.h>
#include <machine/cpu.h>
#include <mvme88k/dev/bugttyfunc.h>
@@ -65,13 +66,6 @@ int bugttycninit(struct consdev *cp);
int bugttycngetc(dev_t dev);
void bugttycnputc(dev_t dev, char c);
-int bugttyopen(dev_t dev, int flag, int mode, struct proc *p);
-int bugttyclose(dev_t dev, int flag, int mode, struct proc *p);
-int bugttyread(dev_t dev, struct uio *uio, int flag);
-int bugttywrite(dev_t dev, struct uio *uio, int flag);
-int bugttyioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p);
-int bugttystop(struct tty *tp, int flag);
-
struct tty *bugttytty(dev_t dev);
int bugttymctl(dev_t dev, int bits, int how);
int bugttyparam(struct tty *tp, struct termios *tm);
@@ -144,7 +138,7 @@ bugttytty(dev)
}
int
- bugttymctl(dev, bits, how)
+bugttymctl(dev, bits, how)
dev_t dev;
int bits, how;
{
@@ -272,7 +266,7 @@ void
bugttyoutput(tp)
struct tty *tp;
{
- int cc, s, cnt ;
+ int cc, s, cnt;
/* only supports one unit */
@@ -374,7 +368,7 @@ bugttywrite(dev, uio, flag)
int
bugttyioctl(dev, cmd, data, flag, p)
dev_t dev;
- int cmd;
+ u_long cmd;
caddr_t data;
int flag;
struct proc *p;
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index 8be0dcb096f..735a8de3f71 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.23 2002/03/14 03:15:57 millert Exp $ */
+/* $OpenBSD: cl.c,v 1.24 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -33,7 +33,6 @@
/* DMA mode still does not work!!! */
#include <sys/param.h>
-#include <sys/conf.h>
#include <sys/ioctl.h>
#include <sys/proc.h>
#include <sys/tty.h>
@@ -43,11 +42,13 @@
#include <sys/device.h>
#include <sys/syslog.h>
-#include <machine/cpu.h>
#include <machine/autoconf.h>
+#include <machine/conf.h>
+#include <machine/cpu.h>
#include <machine/psl.h>
#include <dev/cons.h>
+
#include <mvme88k/dev/clreg.h>
#include "cl.h"
@@ -184,13 +185,6 @@ void cl_dumpport(int channel);
int clprobe(struct device *parent, void *self, void *aux);
void clattach(struct device *parent, struct device *self, void *aux);
-int clopen(dev_t dev, int flag, int mode, struct proc *p);
-int clclose(dev_t dev, int flag, int mode, struct proc *p);
-int clread(dev_t dev, struct uio *uio, int flag);
-int clwrite(dev_t dev, struct uio *uio, int flag);
-int clioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p);
-int clstop(struct tty *tp, int flag);
-
void cl_initchannel(struct clsoftc *sc, int channel);
void clputc(struct clsoftc *sc, int unit, u_char c);
u_char clgetc(struct clsoftc *sc, int *channel);
@@ -373,6 +367,7 @@ clattach(parent, self, aux)
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_mxintrcnt);
printf("\n");
}
+
void
cl_initchannel(sc, channel)
struct clsoftc *sc;
@@ -423,7 +418,8 @@ cl_initchannel(sc, channel)
int cldefaultrate = TTYDEF_SPEED;
-int clmctl (dev, bits, how)
+int
+clmctl(dev, bits, how)
dev_t dev;
int bits;
int how;
@@ -515,7 +511,8 @@ int clmctl (dev, bits, how)
return(bits);
}
-int clopen (dev, flag, mode, p)
+int
+clopen(dev, flag, mode, p)
dev_t dev;
int flag;
int mode;
@@ -657,7 +654,9 @@ if (channel == 2) { /* test one channel now */
#endif
return((*linesw[tp->t_line].l_open)(dev, tp));
}
-int clparam(tp, t)
+
+int
+clparam(tp, t)
struct tty *tp;
struct termios *t;
{
@@ -724,7 +723,8 @@ cloutput(tp)
}
#endif
-int clclose (dev, flag, mode, p)
+int
+clclose(dev, flag, mode, p)
dev_t dev;
int flag;
int mode;
@@ -766,7 +766,9 @@ int clclose (dev, flag, mode, p)
return 0;
}
-int clread (dev, uio, flag)
+
+int
+clread(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
@@ -788,7 +790,8 @@ int clread (dev, uio, flag)
return((*linesw[tp->t_line].l_read)(tp, uio, flag));
}
-int clwrite (dev, uio, flag)
+int
+clwrite(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
@@ -810,9 +813,10 @@ int clwrite (dev, uio, flag)
return((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
-int clioctl (dev, cmd, data, flag, p)
+int
+clioctl(dev, cmd, data, flag, p)
dev_t dev;
- int cmd;
+ u_long cmd;
caddr_t data;
int flag;
struct proc *p;
@@ -891,6 +895,7 @@ int clioctl (dev, cmd, data, flag, p)
return 0;
}
+
int
clstop(tp, flag)
struct tty *tp;
@@ -991,6 +996,7 @@ cl_instat(sc)
}
return (cl_reg->cl_rir & 0x40);
}
+
int
clcngetc(dev)
dev_t dev;
@@ -1078,6 +1084,7 @@ clcnpollc(dev, on)
}
return;
}
+
void
clputc(sc, unit, c)
struct clsoftc *sc;
@@ -1108,33 +1115,33 @@ clputc(sc, unit, c)
}
cl->schr3 = schar;
#else
-if (unit == 0) {
- s = splhigh();
- oldchannel = cl_reg->cl_car;
- cl_reg->cl_car = unit;
- schar = cl_reg->cl_schr3;
- cl_reg->cl_schr3 = c;
- cl_reg->cl_stcr = 0x08 | 0x03; /* send special char, char 3 */
- while (0 != cl_reg->cl_stcr) {
- /* wait until cl notices the command
- * otherwise it may not notice the character
- * if we send characters too fast.
- */
- }
- DELAY(5);
- cl_reg->cl_schr3 = schar;
- cl_reg->cl_car = oldchannel;
- splx(s);
-} else {
- s = splhigh();
- oldchannel = cl_reg->cl_car;
- cl_reg->cl_car = unit;
- if (cl_reg->cl_tftc > 0) {
- cl_reg->cl_tdr = c;
+ if (unit == 0) {
+ s = splhigh();
+ oldchannel = cl_reg->cl_car;
+ cl_reg->cl_car = unit;
+ schar = cl_reg->cl_schr3;
+ cl_reg->cl_schr3 = c;
+ cl_reg->cl_stcr = 0x08 | 0x03; /* send special char, char 3 */
+ while (0 != cl_reg->cl_stcr) {
+ /* wait until cl notices the command
+ * otherwise it may not notice the character
+ * if we send characters too fast.
+ */
+ }
+ DELAY(5);
+ cl_reg->cl_schr3 = schar;
+ cl_reg->cl_car = oldchannel;
+ splx(s);
+ } else {
+ s = splhigh();
+ oldchannel = cl_reg->cl_car;
+ cl_reg->cl_car = unit;
+ if (cl_reg->cl_tftc > 0) {
+ cl_reg->cl_tdr = c;
+ }
+ cl_reg->cl_car = oldchannel;
+ splx(s);
}
- cl_reg->cl_car = oldchannel;
- splx(s);
-}
#endif
return;
}
@@ -1230,6 +1237,7 @@ clgetc(sc, channel)
}
return data;
}
+
int
clccparam(sc, par, channel)
struct clsoftc *sc;
@@ -1357,6 +1365,7 @@ cl_clkdiv(speed)
/* return some sane value if unknown speed */
return cl_clocks[4].divisor;
}
+
u_char
cl_clknum(speed)
int speed;
@@ -1375,6 +1384,7 @@ cl_clknum(speed)
/* return some sane value if unknown speed */
return cl_clocks[4].clock;
}
+
u_char
cl_clkrxtimeout(speed)
int speed;
@@ -1820,6 +1830,7 @@ cl_overflow (sc, channel, ptime, msg)
}
return;
}
+
void
cl_parity (sc, channel)
struct clsoftc *sc;
@@ -1828,6 +1839,7 @@ cl_parity (sc, channel)
log(LOG_WARNING, "%s%d[%d]: parity error\n", cl_cd.cd_name, 0, channel);
return;
}
+
void
cl_frame (sc, channel)
struct clsoftc *sc;
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c
index bc97aeffad0..baecc2aa2db 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.16 2002/03/14 01:26:39 millert Exp $ */
+/* $OpenBSD: dart.c,v 1.17 2002/04/28 15:17:09 miod Exp $ */
/*
* Mach Operating System
@@ -27,7 +27,6 @@
*/
#include <sys/param.h>
-#include <sys/conf.h>
#include <sys/ioctl.h>
#include <sys/proc.h>
#include <sys/tty.h>
@@ -40,6 +39,7 @@
#include <machine/asm_macro.h> /* enable/disable interrupts */
#include <machine/autoconf.h>
+#include <machine/conf.h>
#include <machine/cpu.h>
#include <machine/cpu_number.h>
#include <machine/psl.h>
@@ -107,12 +107,6 @@ void dartmodemtrans(struct dartsoftc *, unsigned int, unsigned int);
void dartrint(struct dartsoftc *, int);
void dartxint(struct dartsoftc *, int);
-int dartopen(dev_t dev, int flag, int mode, struct proc *p);
-int dartclose(dev_t dev, int flag, int mode, struct proc *p);
-int dartread(dev_t dev, struct uio *uio, int flag);
-int dartwrite(dev_t dev, struct uio *uio, int flag);
-int dartioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p);
-int dartstop(struct tty *tp, int flag);
int dartintr(void *);
void dartbreak(dev_t dev, int state);
@@ -539,9 +533,9 @@ dartbreak(dev, state)
}
int
-dartioctl (dev, cmd, data, flag, p)
+dartioctl(dev, cmd, data, flag, p)
dev_t dev;
- int cmd;
+ u_long cmd;
caddr_t data;
int flag;
struct proc *p;
diff --git a/sys/arch/mvme88k/dev/if_ve.c b/sys/arch/mvme88k/dev/if_ve.c
index 9cc37772542..6b37b8aaa01 100644
--- a/sys/arch/mvme88k/dev/if_ve.c
+++ b/sys/arch/mvme88k/dev/if_ve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ve.c,v 1.17 2002/03/14 01:26:39 millert Exp $ */
+/* $OpenBSD: if_ve.c,v 1.18 2002/04/28 15:17:09 miod Exp $ */
/*-
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1982, 1992, 1993
@@ -149,12 +149,8 @@ nvram_cmd(sc, cmd, addr)
u_short addr;
{
int i;
- u_char rcmd = 0;
struct vereg1 *reg1 = ((struct ve_softc *)sc)->sc_r1;
- rcmd = addr;
- rcmd = rcmd << 3;
- rcmd |= cmd;
for (i=0;i<8;i++) {
reg1->ver1_ear=((cmd|(addr<<1))>>i);
CDELAY;
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index d2f73e96ec2..2a10c227462 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.18 2002/03/14 01:26:39 millert Exp $ */
+/* $OpenBSD: nvram.c,v 1.19 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -44,11 +44,12 @@
#include <sys/uio.h>
#include <sys/malloc.h>
-#include <machine/psl.h>
#include <machine/autoconf.h>
#include <machine/bugio.h>
+#include <machine/conf.h>
#include <machine/cpu.h>
#include <machine/mioctl.h>
+#include <machine/psl.h>
#include <machine/vmparam.h>
#include <uvm/uvm_param.h>
@@ -76,14 +77,6 @@ struct cfdriver nvram_cd = {
NULL, "nvram", DV_DULL, 0
};
-int nvramopen(dev_t dev, int flag, int mode);
-int nvramclose(dev_t dev, int flag, int mode);
-int nvramioctl(dev_t dev, int cmd, caddr_t data, int flag,
- struct proc *p);
-int nvramread(dev_t dev, struct uio *uio, int flags);
-int nvramwrite(dev_t dev, struct uio *uio, int flags);
-paddr_t nvrammmap(dev_t dev, off_t off, int prot);
-
u_long chiptotime(int, int, int, int, int, int);
int
@@ -368,7 +361,8 @@ inittodr(base)
* and when rebooting. Do nothing if the time is not yet known, e.g.,
* when crashing during autoconfig.
*/
-void resettodr()
+void
+resettodr()
{
struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0];
struct chiptime c;
@@ -407,9 +401,10 @@ void resettodr()
/*ARGSUSED*/
int
-nvramopen(dev, flag, mode)
+nvramopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
if (minor(dev) >= nvram_cd.cd_ndevs ||
nvram_cd.cd_devs[minor(dev)] == NULL)
@@ -419,9 +414,10 @@ nvramopen(dev, flag, mode)
/*ARGSUSED*/
int
-nvramclose(dev, flag, mode)
+nvramclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
return (0);
}
@@ -430,7 +426,7 @@ nvramclose(dev, flag, mode)
int
nvramioctl(dev, cmd, data, flag, p)
dev_t dev;
- int cmd;
+ u_long cmd;
caddr_t data;
int flag;
struct proc *p;
diff --git a/sys/arch/mvme88k/dev/nvramreg.h b/sys/arch/mvme88k/dev/nvramreg.h
index 365fd5fa880..0990817d113 100644
--- a/sys/arch/mvme88k/dev/nvramreg.h
+++ b/sys/arch/mvme88k/dev/nvramreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvramreg.h,v 1.3 1999/09/27 18:43:24 smurph Exp $ */
+/* $OpenBSD: nvramreg.h,v 1.4 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -89,9 +89,6 @@ struct m188_clockreg {
#define CLK_WRITE 0x80 /* want to write */
#define CLK_READ 0x40 /* want to read (freeze clock) */
-struct clockreg *clockreg;
-struct m188_clockreg *m188_clockreg;
-
/*
* Motorola chose the year `1900' as their base count.
* XXX what happens when it wraps?
diff --git a/sys/arch/mvme88k/dev/sram.c b/sys/arch/mvme88k/dev/sram.c
index 634a9b4a672..b4b21736d4a 100644
--- a/sys/arch/mvme88k/dev/sram.c
+++ b/sys/arch/mvme88k/dev/sram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sram.c,v 1.8 2002/03/14 01:26:39 millert Exp $ */
+/* $OpenBSD: sram.c,v 1.9 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -32,17 +32,18 @@
*/
#include <sys/param.h>
-#include <sys/conf.h>
#include <sys/ioctl.h>
#include <sys/buf.h>
#include <sys/systm.h>
#include <sys/uio.h>
#include <sys/malloc.h>
-
#include <sys/device.h>
-#include <machine/cpu.h>
+
#include <machine/autoconf.h>
+#include <machine/conf.h>
+#include <machine/cpu.h>
#include <machine/mioctl.h>
+
#include <uvm/uvm_extern.h>
struct sramsoftc {
@@ -136,9 +137,10 @@ sramattach(parent, self, args)
/*ARGSUSED*/
int
-sramopen(dev, flag, mode)
+sramopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
if (minor(dev) >= sram_cd.cd_ndevs ||
sram_cd.cd_devs[minor(dev)] == NULL)
@@ -148,9 +150,10 @@ sramopen(dev, flag, mode)
/*ARGSUSED*/
int
-sramclose(dev, flag, mode)
+sramclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
return (0);
@@ -159,9 +162,10 @@ sramclose(dev, flag, mode)
/*ARGSUSED*/
int
sramioctl(dev, cmd, data, flag, p)
- dev_t dev;
+ dev_t dev;
+ u_long cmd;
caddr_t data;
- int cmd, flag;
+ int flag;
struct proc *p;
{
int unit = minor(dev);
diff --git a/sys/arch/mvme88k/dev/vmel.c b/sys/arch/mvme88k/dev/vmel.c
index 7881d1e1295..d80c17def69 100644
--- a/sys/arch/mvme88k/dev/vmel.c
+++ b/sys/arch/mvme88k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.9 2002/03/14 03:15:57 millert Exp $ */
+/* $OpenBSD: vmel.c,v 1.10 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -31,15 +31,16 @@
*/
#include <sys/param.h>
-#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
-#include <machine/cpu.h>
#include <machine/autoconf.h>
+#include <machine/conf.h>
+#include <machine/cpu.h>
+
#include <mvme88k/dev/vme.h>
/*
@@ -60,12 +61,6 @@ struct cfdriver vmel_cd = {
};
int vmelscan(struct device *, void *, void *);
-int vmelopen(dev_t, int, int);
-int vmelclose(dev_t, int, int);
-int vmelioctl(dev_t, int, caddr_t, int, struct proc *);
-int vmelread(dev_t, struct uio *, int);
-int vmelwrite(dev_t, struct uio *, int);
-paddr_t vmelmmap(dev_t, off_t, int);
int
vmelmatch(parent, cf, args)
@@ -99,9 +94,10 @@ vmelattach(parent, self, args)
/*ARGSUSED*/
int
-vmelopen(dev, flag, mode)
+vmelopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
if (minor(dev) >= vmel_cd.cd_ndevs ||
vmel_cd.cd_devs[minor(dev)] == NULL)
@@ -111,9 +107,10 @@ vmelopen(dev, flag, mode)
/*ARGSUSED*/
int
-vmelclose(dev, flag, mode)
+vmelclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
return (0);
@@ -122,9 +119,10 @@ vmelclose(dev, flag, mode)
/*ARGSUSED*/
int
vmelioctl(dev, cmd, data, flag, p)
- dev_t dev;
+ dev_t dev;
+ u_long cmd;
caddr_t data;
- int cmd, flag;
+ int flag;
struct proc *p;
{
int error = 0;
diff --git a/sys/arch/mvme88k/dev/vmes.c b/sys/arch/mvme88k/dev/vmes.c
index 94d8db82de4..1b7bcb0c1a5 100644
--- a/sys/arch/mvme88k/dev/vmes.c
+++ b/sys/arch/mvme88k/dev/vmes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmes.c,v 1.9 2002/03/14 03:15:57 millert Exp $ */
+/* $OpenBSD: vmes.c,v 1.10 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -31,7 +31,6 @@
*/
#include <sys/param.h>
-#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <sys/systm.h>
@@ -39,7 +38,9 @@
#include <sys/device.h>
#include <machine/autoconf.h>
+#include <machine/conf.h>
#include <machine/cpu.h>
+
#include <mvme88k/dev/vme.h>
/*
@@ -60,12 +61,6 @@ struct cfdriver vmes_cd = {
};
int vmesscan(struct device *, void *, void *);
-int vmesopen(dev_t, int, int);
-int vmesclose(dev_t, int, int);
-int vmesioctl(dev_t, int, caddr_t, int, struct proc *);
-int vmesread(dev_t, struct uio *, int);
-int vmeswrite(dev_t, struct uio *, int);
-paddr_t vmesmmap(dev_t, off_t, int);
int
vmesmatch(parent, cf, args)
@@ -99,9 +94,10 @@ vmesattach(parent, self, args)
/*ARGSUSED*/
int
-vmesopen(dev, flag, mode)
+vmesopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
if (minor(dev) >= vmes_cd.cd_ndevs ||
vmes_cd.cd_devs[minor(dev)] == NULL)
@@ -111,9 +107,10 @@ vmesopen(dev, flag, mode)
/*ARGSUSED*/
int
-vmesclose(dev, flag, mode)
+vmesclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
return (0);
@@ -122,9 +119,10 @@ vmesclose(dev, flag, mode)
/*ARGSUSED*/
int
vmesioctl(dev, cmd, data, flag, p)
- dev_t dev;
+ dev_t dev;
+ u_long cmd;
caddr_t data;
- int cmd, flag;
+ int flag;
struct proc *p;
{
int error = 0;
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index a14c22f3c47..c6d0eb97511 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.19 2002/03/14 03:15:57 millert Exp $ */
+/* $OpenBSD: vx.c,v 1.20 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -31,7 +31,6 @@
*/
#include <sys/param.h>
-#include <sys/conf.h>
#include <sys/ioctl.h>
#include <sys/proc.h>
#include <sys/tty.h>
@@ -41,8 +40,9 @@
#include <sys/device.h>
#include <sys/syslog.h>
-#include <machine/cpu.h>
#include <machine/autoconf.h>
+#include <machine/conf.h>
+#include <machine/cpu.h>
#include <machine/psl.h>
#include <dev/cons.h>
@@ -138,13 +138,7 @@ int vx_mctl(dev_t dev, int bits, int how);
int vxmatch(struct device *parent, void *self, void *aux);
void vxattach(struct device *parent, struct device *self, void *aux);
-int vxopen(dev_t dev, int flag, int mode, struct proc *p);
-int vxclose(dev_t dev, int flag, int mode, struct proc *p);
-int vxread(dev_t dev, struct uio *uio, int flag);
-int vxwrite(dev_t dev, struct uio *uio, int flag);
-int vxioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p);
void vxstart(struct tty *tp);
-int vxstop(struct tty *tp, int flag);
void vxputc(struct vxsoftc *sc, int port, u_char c);
@@ -721,7 +715,7 @@ vxwrite (dev, uio, flag)
int
vxioctl (dev, cmd, data, flag, p)
dev_t dev;
- int cmd;
+ u_long cmd;
caddr_t data;
int flag;
struct proc *p;
diff --git a/sys/arch/mvme88k/include/conf.h b/sys/arch/mvme88k/include/conf.h
new file mode 100644
index 00000000000..ef3717ba478
--- /dev/null
+++ b/sys/arch/mvme88k/include/conf.h
@@ -0,0 +1,45 @@
+/* $OpenBSD: conf.h,v 1.1 2002/04/28 15:17:09 miod Exp $ */
+/*
+ * Copyright (c) 2002, Miodrag Vallat.
+ * All rights reserved.
+ *
+ * Permission to redistribute, use, copy, and modify this software
+ * without fee is hereby granted, provided that the following
+ * conditions are met:
+ *
+ * 1. This entire notice is included in all source code copies of any
+ * software which is or includes a copy or modification of this
+ * software.
+ * 2. 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 AUTHOR ``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 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/conf.h>
+
+#define mmread mmrw
+#define mmwrite mmrw
+cdev_decl(mm);
+
+cdev_decl(vmel);
+cdev_decl(vmes);
+
+cdev_decl(nvram);
+cdev_decl(sram);
+
+cdev_decl(bugtty);
+cdev_decl(cl);
+cdev_decl(dart);
+cdev_decl(vx);
diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c
index dcddf76d533..493045bc2da 100644
--- a/sys/arch/mvme88k/mvme88k/conf.c
+++ b/sys/arch/mvme88k/mvme88k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.20 2001/09/28 02:53:13 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.21 2002/04/28 15:17:09 miod Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -40,9 +40,10 @@
#include <sys/buf.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
-#include <sys/conf.h>
#include <sys/vnode.h>
+#include <machine/conf.h>
+
#include "pty.h"
#include "bpfilter.h"
#include "tun.h"
@@ -76,23 +77,11 @@ bdev_decl(xd);
cdev_decl(xd);
#endif /* notyet */
-#define mmread mmrw
-#define mmwrite mmrw
-cdev_decl(mm);
-cdev_decl(sram);
-cdev_decl(nvram);
-cdev_decl(vmel);
-cdev_decl(vmes);
#ifdef notyet
#include "flash.h"
cdev_decl(flash);
#endif /* notyet */
-cdev_decl(dart);
-cdev_decl(cl);
-cdev_decl(bugtty);
-cdev_decl(vx);
-
/* open, close, write, ioctl */
#define cdev_lp_init(c,n) { \
dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
@@ -128,7 +117,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NCD,cd), /* 6: SCSI CD-ROM */
bdev_disk_init(NRD,rd), /* 7: ramdisk */
bdev_disk_init(NVND,vnd), /* 8: vnode disk driver */
- bdev_notdef(), /* 9 */
+ bdev_disk_init(NCCD,ccd), /* 9: concatenated disk driver */
#if notyet
bdev_disk_init(NXD,xd), /* 10: XD disk */
#endif /* notyet */
@@ -294,7 +283,7 @@ static int chrtoblktbl[] = {
/*
* Convert a character device number to a block device number.
*/
-int
+dev_t
chrtoblk(dev)
dev_t dev;
{
@@ -335,12 +324,12 @@ blktochr(dev)
*/
#include <dev/cons.h>
-#define dartcnpollc nullcnpollc
-cons_decl(dart);
-#define clcnpollc nullcnpollc
-cons_decl(cl);
-#define bugttycnpollc nullcnpollc
+#define bugttycnpollc nullcnpollc
cons_decl(bugtty);
+#define clcnpollc nullcnpollc
+cons_decl(cl);
+#define dartcnpollc nullcnpollc
+cons_decl(dart);
struct consdev constab[] = {
#if NDART > 0
diff --git a/sys/arch/mvme88k/mvme88k/mem.c b/sys/arch/mvme88k/mvme88k/mem.c
index 133b5199724..740191e3ef2 100644
--- a/sys/arch/mvme88k/mvme88k/mem.c
+++ b/sys/arch/mvme88k/mvme88k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.15 2002/03/14 01:26:40 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.16 2002/04/28 15:17:09 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -57,17 +57,16 @@
caddr_t zeropage;
-int mmopen(dev_t, int, int);
-int mmclose(dev_t, int, int);
-int mmrw(dev_t, struct uio *, int);
-paddr_t mmmmap(dev_t, off_t, int);
-int mmioctl(dev_t, u_long, caddr_t, int, struct proc *);
+#define mmread mmrw
+#define mmwrite mmrw
+cdev_decl(mm);
/*ARGSUSED*/
int
-mmopen(dev, flag, mode)
+mmopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
switch (minor(dev)) {
@@ -83,9 +82,10 @@ mmopen(dev, flag, mode)
/*ARGSUSED*/
int
-mmclose(dev, flag, mode)
+mmclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
+ struct proc *p;
{
return (0);