summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-08-26 02:37:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-08-26 02:37:08 +0000
commit40fa393c45fd6ea6f962a70da026768f6ad9ffa1 (patch)
tree69f7cd34483c7a70b31288f975bde4cbc95e5340 /sys/arch/mvme88k/dev
parenta313e244b1d4ef436b53f164be90abf5f0e7104f (diff)
Add prototypes, fix compilation warnings, random style fixes.
Diffstat (limited to 'sys/arch/mvme88k/dev')
-rw-r--r--sys/arch/mvme88k/dev/cl.c14
-rw-r--r--sys/arch/mvme88k/dev/dart.c15
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c87
-rw-r--r--sys/arch/mvme88k/dev/if_ve.c45
-rw-r--r--sys/arch/mvme88k/dev/if_vevar.h10
-rw-r--r--sys/arch/mvme88k/dev/mainbus.c5
-rw-r--r--sys/arch/mvme88k/dev/nvram.c6
-rw-r--r--sys/arch/mvme88k/dev/sclock.c9
-rw-r--r--sys/arch/mvme88k/dev/ssh.c4
-rw-r--r--sys/arch/mvme88k/dev/sshdma.c4
-rw-r--r--sys/arch/mvme88k/dev/vme.c26
-rw-r--r--sys/arch/mvme88k/dev/vmel.c10
-rw-r--r--sys/arch/mvme88k/dev/vmes.c10
-rw-r--r--sys/arch/mvme88k/dev/vs.c28
-rw-r--r--sys/arch/mvme88k/dev/vsvar.h4
-rw-r--r--sys/arch/mvme88k/dev/vx.c49
16 files changed, 202 insertions, 124 deletions
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index 0fb12aab481..92e8c46f7fc 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.12 2001/08/24 22:46:57 miod Exp $ */
+/* $OpenBSD: cl.c,v 1.13 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -65,6 +65,8 @@
#define CL_TXINTR 0x02
#define CL_RXINTR 0x02
+#define CLCD_DO_POLLED_INPUT
+
#ifdef DEBUG
#undef DEBUG
#endif
@@ -148,8 +150,10 @@ struct {
/* prototypes */
int clcnprobe __P((struct consdev *cp));
int clcninit __P((struct consdev *cp));
+int cl_instat __P((struct clsoftc *sc));
int clcngetc __P((dev_t dev));
int clcnputc __P((dev_t dev, u_char c));
+void clcnpollc __P((dev_t, int));
u_char cl_clkdiv __P((int speed));
u_char cl_clknum __P((int speed));
u_char cl_clkrxtimeout __P((int speed));
@@ -166,7 +170,9 @@ void cl_parity __P((struct clsoftc *sc, int channel));
void cl_frame __P((struct clsoftc *sc, int channel));
void cl_break __P(( struct clsoftc *sc, int channel));
int clmctl __P((dev_t dev, int bits, int how));
+#ifdef DEBUG
void cl_dumpport __P((int channel));
+#endif
int clprobe __P((struct device *parent, void *self, void *aux));
void clattach __P((struct device *parent, struct device *self, void *aux));
@@ -184,6 +190,9 @@ u_char clgetc __P((struct clsoftc *sc, int *channel));
#if 0
void cloutput __P( (struct tty *tp));
#endif
+#ifdef CLCD_DO_POLLED_INPUT
+void cl_chkinput __P((void));
+#endif
struct cfattach cl_ca = {
sizeof(struct clsoftc), clprobe, clattach
@@ -1128,10 +1137,7 @@ if (unit == 0) {
return;
}
-/*
#ifdef CLCD_DO_POLLED_INPUT
-*/
-#if 1
void
cl_chkinput()
{
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c
index 3c9cfee53d6..1e6dae463e8 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.9 2001/08/24 19:32:06 miod Exp $ */
+/* $OpenBSD: dart.c,v 1.10 2001/08/26 02:37:07 miod Exp $ */
/*
* Mach Operating System
@@ -98,6 +98,14 @@ int dartcnprobe __P((struct consdev *cp));
int dartcninit __P((struct consdev *cp));
int dartcngetc __P((dev_t dev));
void dartcnputc __P((dev_t dev, char c));
+int dart_speed __P((int));
+struct tty* darttty __P((dev_t));
+void dartstart __P((struct tty *));
+int dartmctl __P((dev_t, int, int));
+int dartparam __P((struct tty *, struct termios *));
+void dartmodemtrans __P((struct dartsoftc *, unsigned int, unsigned int));
+void dartrint __P((struct dartsoftc *, int));
+void dartxint __P((struct dartsoftc *, int));
int dartopen __P((dev_t dev, int flag, int mode, struct proc *p));
int dartclose __P((dev_t dev, int flag, int mode, struct proc *p));
@@ -180,7 +188,7 @@ dartmatch(parent, vcf, args)
if (cputyp != CPU_188) return (0);
ca->ca_vaddr = ca->ca_paddr; /* 1:1 */
addr = (union dartreg *)ca->ca_vaddr;
- if (badvaddr(addr, 2) <= 0) {
+ if (badvaddr((vaddr_t)addr, 2) <= 0) {
printf("==> dart: failed address check.\n");
return (0);
}
@@ -1233,7 +1241,10 @@ dartcngetc(dev)
int c; /* received character */
int s;
int port;
+#if 1
+#else
m88k_psr_type psr;
+#endif
char buf[] = "char x";
port = DART_PORT(dev);
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index 7468d49a94b..d7be5a50e8a 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.13 2001/08/24 19:26:12 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.14 2001/08/26 02:37:07 miod Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -135,6 +135,7 @@ Mode of operation:
#include <machine/pmap.h>
#include "pcctwo.h"
#include <mvme88k/dev/pcctworeg.h>
+#include <mvme88k/dev/pcctwofunc.h>
#include <mvme88k/dev/if_ie.h>
#include <mvme88k/dev/i82596.h>
#include <machine/board.h>
@@ -174,9 +175,12 @@ struct ie_softc {
struct arpcom sc_arpcom;/* system arpcom structure */
- void (*reset_596)(); /* card dependent reset function */
- void (*chan_attn)(); /* card dependent attn function */
- void (*run_596)(); /* card depenent "go on-line" function */
+ void (*reset_596) __P((struct ie_softc *));
+ /* card dependent reset function */
+ void (*chan_attn) __P((struct ie_softc *));
+ /* card dependent attn function */
+ void (*run_596) __P((struct ie_softc *));
+ /* card depenent "go on-line" function */
void (*memcopy) __P((const void *, void *, u_int));
/* card dependent memory copy function */
void (*memzero) __P((void *, u_int));
@@ -233,9 +237,9 @@ struct ie_softc {
#endif
};
-static void ie_obreset __P((struct ie_softc *));
-static void ie_obattend __P((struct ie_softc *));
-static void ie_obrun __P((struct ie_softc *));
+void ie_obreset __P((struct ie_softc *));
+void ie_obattend __P((struct ie_softc *));
+void ie_obrun __P((struct ie_softc *));
int ie_setupram __P((struct ie_softc *sc));
void iewatchdog __P((struct ifnet *));
@@ -245,17 +249,31 @@ int ieinit __P((struct ie_softc *));
int ieioctl __P((struct ifnet *, u_long, caddr_t));
void iestart __P((struct ifnet *));
void iereset __P((struct ie_softc *));
-static void ie_readframe __P((struct ie_softc *, int));
-static void ie_drop_packet_buffer __P((struct ie_softc *));
-static int command_and_wait __P((struct ie_softc *, int,
+void ie_readframe __P((struct ie_softc *, int));
+void ie_drop_packet_buffer __P((struct ie_softc *));
+int command_and_wait __P((struct ie_softc *, int,
void volatile *, int));
-/*static*/ void ierint __P((struct ie_softc *));
-/*static*/ void ietint __P((struct ie_softc *));
-static int ieget __P((struct ie_softc *, struct mbuf **,
+void ierint __P((struct ie_softc *));
+void ietint __P((struct ie_softc *));
+int ieget __P((struct ie_softc *, struct mbuf **,
struct ether_header *, int *));
-static void setup_bufs __P((struct ie_softc *));
-static int mc_setup __P((struct ie_softc *, void *));
-static void mc_reset __P((struct ie_softc *));
+void setup_bufs __P((struct ie_softc *));
+int mc_setup __P((struct ie_softc *, void *));
+void mc_reset __P((struct ie_softc *));
+static __inline int ether_equal __P((u_char *, u_char *));
+static __inline void ie_ack __P((struct ie_softc *, u_int));
+static __inline void ie_setup_config __P((volatile struct ie_config_cmd *,
+ int, int));
+static __inline int check_eh __P((struct ie_softc *, struct ether_header *,
+ int *));
+static __inline int ie_buflen __P((struct ie_softc *, int));
+static __inline int ie_packet_len __P((struct ie_softc *));
+static __inline void iexmit __P((struct ie_softc *));
+static __inline caddr_t Align __P((caddr_t));
+
+void chan_attn_timeout __P((void *));
+void run_tdr __P((struct ie_softc *, struct ie_tdr_cmd *));
+void iestop __P((struct ie_softc *));
#ifdef IEDEBUG
void print_rbd __P((volatile struct ie_recv_buf_desc *));
@@ -264,9 +282,8 @@ int in_ierint = 0;
int in_ietint = 0;
#endif
-int iematch();
-void ieattach();
-extern void pcctwointr_establish();
+int iematch __P((struct device *, void *, void *));
+void ieattach __P((struct device *, struct device *, void *));
struct cfattach ie_ca = {
sizeof(struct ie_softc), iematch, ieattach
@@ -360,7 +377,7 @@ ie_obreset(sc)
ieo->portlow = a >> 16;
delay(1000);
- pmap_extract(pmap_kernel(), sc->scp, &a);
+ pmap_extract(pmap_kernel(), (vaddr_t)sc->scp, &a);
a |= IE_PORT_NEWSCPADDR;
ieo->porthigh = a & 0xffff;
t = 0; t = 1;
@@ -415,7 +432,7 @@ ieattach(parent, self, aux)
/* get the first avaliable etherbuf */
sc->sc_maddr = etherbuf; /* maddr = vaddr */
if (sc->sc_maddr == NULL) panic("ie: too many ethernet boards");
- if (pmap_extract(pmap_kernel(), sc->sc_maddr, &pa) == FALSE)
+ if (pmap_extract(pmap_kernel(), (vaddr_t)sc->sc_maddr, &pa) == FALSE)
panic("ie: pmap_extract");
sc->sc_iobase = (caddr_t)pa; /* iobase = paddr (24 bit) */
@@ -431,7 +448,7 @@ ieattach(parent, self, aux)
/*printf("scpV %x iscpV %x scbV %x\n", sc->scp, sc->iscp, sc->scb);*/
sc->scp->ie_bus_use = 0x44;
- pmap_extract(pmap_kernel(), sc->iscp, &pa);
+ pmap_extract(pmap_kernel(), (vaddr_t)sc->iscp, &pa);
SWT_32(sc->scp->ie_iscp_ptr, pa);
/*
* rest of first page is unused (wasted!), rest of ram
@@ -910,7 +927,7 @@ sc->xmit_cbuffs[sc->xctail]);
* chain of partially-full mbufs. This should help to speed up the
* operation considerably. (Provided that it works, of course.)
*/
-static inline int
+int
ieget(sc, mp, ehp, to_bpf)
struct ie_softc *sc;
struct mbuf **mp;
@@ -1086,7 +1103,7 @@ ieget(sc, mp, ehp, to_bpf)
* on confusing code to deal with them. Hopefully, this machine will never ARP
* for trailers anyway.
*/
-static void
+void
ie_readframe(sc, num)
struct ie_softc *sc;
int num; /* frame number to read */
@@ -1176,7 +1193,7 @@ ie_readframe(sc, num)
ether_input(&sc->sc_arpcom.ac_if, &eh, m);
}
-static void
+void
ie_drop_packet_buffer(sc)
struct ie_softc *sc;
{
@@ -1359,7 +1376,7 @@ chan_attn_timeout(rock)
* ((volatile struct ie_cmd_common *)pcmd)->ie_cmd_status & MASK
* to become true.
*/
-static int
+int
command_and_wait(sc, cmd, pcmd, mask)
struct ie_softc *sc;
int cmd;
@@ -1426,7 +1443,7 @@ command_and_wait(sc, cmd, pcmd, mask)
/*
* Run the time-domain reflectometer.
*/
-static void
+void
run_tdr(sc, cmd)
struct ie_softc *sc;
struct ie_tdr_cmd *cmd;
@@ -1495,7 +1512,7 @@ Align(ptr)
* note: this function was written to be easy to understand, rather than
* highly efficient (it isn't in the critical path).
*/
-static void
+void
setup_bufs(sc)
struct ie_softc *sc;
{
@@ -1509,14 +1526,14 @@ setup_bufs(sc)
(sc->memzero)(ptr, sc->buf_area_sz);
ptr = Align(ptr); /* set alignment and stick with it */
- n = (int)Align(sizeof(struct ie_xmit_cmd)) +
- (int)Align(sizeof(struct ie_xmit_buf)) + IE_TBUF_SIZE;
+ n = (int)Align((caddr_t)sizeof(struct ie_xmit_cmd)) +
+ (int)Align((caddr_t)sizeof(struct ie_xmit_buf)) + IE_TBUF_SIZE;
n *= NTXBUF; /* n = total size of xmit area */
n = sc->buf_area_sz - n;/* n = free space for recv stuff */
- r = (int)Align(sizeof(struct ie_recv_frame_desc)) +
- (((int)Align(sizeof(struct ie_recv_buf_desc)) + IE_RBUF_SIZE) * B_PER_F);
+ r = (int)Align((caddr_t)sizeof(struct ie_recv_frame_desc)) +
+ (((int)Align((caddr_t)sizeof(struct ie_recv_buf_desc)) + IE_RBUF_SIZE) * B_PER_F);
/* r = size of one R frame */
@@ -1624,7 +1641,7 @@ setup_bufs(sc)
* Run the multicast setup command.
* Called at splnet().
*/
-static int
+int
mc_setup(sc, ptr)
struct ie_softc *sc;
void *ptr;
@@ -1751,7 +1768,7 @@ ieinit(sc)
return 0;
}
-static void
+void
iestop(sc)
struct ie_softc *sc;
{
@@ -1851,7 +1868,7 @@ ieioctl(ifp, cmd, data)
return error;
}
-static void
+void
mc_reset(sc)
struct ie_softc *sc;
{
diff --git a/sys/arch/mvme88k/dev/if_ve.c b/sys/arch/mvme88k/dev/if_ve.c
index f0be73cd82a..ae9300c2e5f 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.8 2001/08/11 23:21:13 art Exp $ */
+/* $OpenBSD: if_ve.c,v 1.9 2001/08/26 02:37:07 miod Exp $ */
/*-
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1982, 1992, 1993
@@ -87,14 +87,14 @@ void ve_recv_print __P((struct vam7990_softc *, int));
void ve_xmit_print __P((struct vam7990_softc *, int));
#endif
-integrate void ve_rint __P((struct vam7990_softc *));
-integrate void ve_tint __P((struct vam7990_softc *));
+void ve_rint __P((struct vam7990_softc *));
+void ve_tint __P((struct vam7990_softc *));
-integrate int ve_put __P((struct vam7990_softc *, int, struct mbuf *));
-integrate struct mbuf *ve_get __P((struct vam7990_softc *, int, int));
-integrate void ve_read __P((struct vam7990_softc *, int, int));
+int ve_put __P((struct vam7990_softc *, int, struct mbuf *));
+struct mbuf *ve_get __P((struct vam7990_softc *, int, int));
+void ve_read __P((struct vam7990_softc *, int, int));
-hide void ve_shutdown __P((void *));
+void ve_shutdown __P((void *));
#define ifp (&sc->sc_arpcom.ac_if)
#ifndef ETHER_CMP
@@ -136,12 +136,16 @@ struct cfattach ve_ca = {
sizeof(struct ve_softc), vematch, veattach
};
-hide void vewrcsr __P((struct vam7990_softc *, u_int16_t, u_int16_t));
-hide u_int16_t verdcsr __P((struct vam7990_softc *, u_int16_t));
+void vewrcsr __P((struct vam7990_softc *, u_int16_t, u_int16_t));
+u_int16_t verdcsr __P((struct vam7990_softc *, u_int16_t));
+void nvram_cmd __P((struct vam7990_softc *, u_char, u_short));
+u_int16_t nvram_read __P((struct vam7990_softc *, u_char));
+void vereset __P((struct vam7990_softc *));
+void ve_ackint __P((struct vam7990_softc *));
/* send command to the nvram controller */
void
-nvram_cmd(sc, cmd, addr )
+nvram_cmd(sc, cmd, addr)
struct vam7990_softc *sc;
u_char cmd;
u_short addr;
@@ -189,7 +193,7 @@ nvram_read(sc, nvram_addr)
return (val);
}
-hide void
+void
vewrcsr(sc, port, val)
struct vam7990_softc *sc;
u_int16_t port, val;
@@ -200,7 +204,7 @@ vewrcsr(sc, port, val)
ve1->ver1_rdp = val;
}
-hide u_int16_t
+u_int16_t
verdcsr(sc, port)
struct vam7990_softc *sc;
u_int16_t port;
@@ -305,7 +309,7 @@ veattach(parent, self, aux)
if (sc->sc_mem == NULL) panic("ve: no more memory in external I/O map");
sc->sc_memsize = LEMEMSIZE;
sc->sc_conf3 = LE_C3_BSWP;
- sc->sc_addr = kvtop(sc->sc_mem);
+ sc->sc_addr = kvtop((vm_offset_t)sc->sc_mem);
/* get ether address via bug call */
veetheraddr(sc);
@@ -576,7 +580,7 @@ ve_init(sc)
* Routine to copy from mbuf chain to transmit buffer in
* network buffer memory.
*/
-integrate int
+int
ve_put(sc, boff, m)
struct vam7990_softc *sc;
int boff;
@@ -609,7 +613,7 @@ ve_put(sc, boff, m)
* We copy the data into mbufs. When full cluster sized units are present
* we copy into clusters.
*/
-integrate struct mbuf *
+struct mbuf *
ve_get(sc, boff, totlen)
struct vam7990_softc *sc;
int boff, totlen;
@@ -657,7 +661,7 @@ ve_get(sc, boff, totlen)
/*
* Pass a packet to the higher levels.
*/
-integrate void
+void
ve_read(sc, boff, len)
register struct vam7990_softc *sc;
int boff, len;
@@ -703,6 +707,7 @@ ve_read(sc, boff, len)
* destination address (garbage will usually not match).
* Of course, this precludes multicast support...
*/
+ eh = mtod(m, struct ether_header *);
if (ETHER_CMP(eh->ether_dhost, sc->sc_arpcom.ac_enaddr) &&
ETHER_CMP(eh->ether_dhost, etherbroadcastaddr)) {
m_freem(m);
@@ -714,7 +719,7 @@ ve_read(sc, boff, len)
ether_input_mbuf(ifp, m);
}
-integrate void
+void
ve_rint(sc)
struct vam7990_softc *sc;
{
@@ -789,7 +794,7 @@ ve_rint(sc)
sc->sc_last_rd = bix;
}
-integrate void
+void
ve_tint(sc)
register struct vam7990_softc *sc;
{
@@ -1142,7 +1147,7 @@ ve_ioctl(ifp, cmd, data)
return (error);
}
-hide void
+void
ve_shutdown(arg)
void *arg;
{
@@ -1341,5 +1346,3 @@ ve_zerobuf_contig(sc, boff, len)
*/
bzero(buf + boff, len);
}
-
-
diff --git a/sys/arch/mvme88k/dev/if_vevar.h b/sys/arch/mvme88k/dev/if_vevar.h
index 4c7de6d0571..344e7fc53ac 100644
--- a/sys/arch/mvme88k/dev/if_vevar.h
+++ b/sys/arch/mvme88k/dev/if_vevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vevar.h,v 1.1 1999/05/29 04:41:43 smurph Exp $ */
+/* $OpenBSD: if_vevar.h,v 1.2 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@@ -31,14 +31,6 @@
#define LEDEBUG 1
-#ifdef DDB
-#define integrate
-#define hide
-#else
-#define integrate static __inline
-#define hide static
-#endif
-
/*
* Ethernet software status per device.
*
diff --git a/sys/arch/mvme88k/dev/mainbus.c b/sys/arch/mvme88k/dev/mainbus.c
index 2892a076d48..ccda4910b1a 100644
--- a/sys/arch/mvme88k/dev/mainbus.c
+++ b/sys/arch/mvme88k/dev/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.3 1999/05/29 04:41:44 smurph Exp $ */
+/* $OpenBSD: mainbus.c,v 1.4 2001/08/26 02:37:07 miod Exp $ */
/* Copyright (c) 1998 Steve Murphree, Jr. */
#include <sys/param.h>
#include <sys/systm.h>
@@ -12,6 +12,8 @@
void mainbus_attach __P((struct device *, struct device *, void *));
int mainbus_match __P((struct device *, void *, void *));
+int mainbus_print __P((void *, const char *));
+int mainbus_scan __P((struct device *, void *, void *));
struct cfattach mainbus_ca = {
sizeof(struct device), mainbus_match, mainbus_attach
@@ -77,4 +79,3 @@ mainbus_attach(parent, self, args)
(void)config_search(mainbus_scan, self, args);
}
-
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index c43013944c3..a2a54b3eac0 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.10 2001/06/14 21:30:34 miod Exp $ */
+/* $OpenBSD: nvram.c,v 1.11 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -84,6 +84,8 @@ int nvramread __P((dev_t dev, struct uio *uio, int flags));
int nvramwrite __P((dev_t dev, struct uio *uio, int flags));
int nvrammmap __P((dev_t dev, int off, int prot));
+u_long chiptotime __P((int, int, int, int, int, int));
+
int
nvrammatch(parent, vcf, args)
struct device *parent;
@@ -199,7 +201,7 @@ microtime(tvp)
const short dayyr[12] =
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
-static u_long
+u_long
chiptotime(sec, min, hour, day, mon, year)
register int sec, min, hour, day, mon, year;
{
diff --git a/sys/arch/mvme88k/dev/sclock.c b/sys/arch/mvme88k/dev/sclock.c
index 30feb7d3e0d..1611102b33a 100644
--- a/sys/arch/mvme88k/dev/sclock.c
+++ b/sys/arch/mvme88k/dev/sclock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sclock.c,v 1.5 2001/03/09 05:44:39 smurph Exp $ */
+/* $OpenBSD: sclock.c,v 1.6 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
*
@@ -117,12 +117,13 @@ struct simplelock cio_lock;
int statvar = 8192;
int statmin; /* statclock interval - 1/2*variance */
-static int sclockmatch __P((struct device *, void *, void *));
-static void sclockattach __P((struct device *, struct device *, void *));
+int sclockmatch __P((struct device *, void *, void *));
+void sclockattach __P((struct device *, struct device *, void *));
void sbc_initstatclock __P((void));
void m188_initstatclock __P((void));
void m188_cio_init __P((unsigned));
+u_char read_cio __P((unsigned));
void write_cio __P((unsigned, unsigned));
struct sclocksoftc {
@@ -369,7 +370,7 @@ write_cio(reg, val)
}
/* Read CIO register */
-static u_char
+u_char
read_cio(reg)
unsigned reg;
{
diff --git a/sys/arch/mvme88k/dev/ssh.c b/sys/arch/mvme88k/dev/ssh.c
index cdf1665a7b6..ab98884198e 100644
--- a/sys/arch/mvme88k/dev/ssh.c
+++ b/sys/arch/mvme88k/dev/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: ssh.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -51,7 +51,9 @@
#include <sys/buf.h>
#include <sys/malloc.h>
+#include <vm/vm.h>
#include <vm/pmap.h>
+#include <uvm/uvm_extern.h>
#include <machine/autoconf.h>
#include <machine/mmu.h>
diff --git a/sys/arch/mvme88k/dev/sshdma.c b/sys/arch/mvme88k/dev/sshdma.c
index 42b50ee43a8..167b3babb1d 100644
--- a/sys/arch/mvme88k/dev/sshdma.c
+++ b/sys/arch/mvme88k/dev/sshdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshdma.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: sshdma.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
@@ -43,7 +43,9 @@
#include <sys/kernel.h>
#include <sys/device.h>
+#include <vm/vm.h>
#include <vm/pmap.h>
+#include <uvm/uvm_extern.h>
#include <machine/autoconf.h>
#include <machine/board.h>
diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c
index 1aacc02f30b..670ecf6c831 100644
--- a/sys/arch/mvme88k/dev/vme.c
+++ b/sys/arch/mvme88k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.11 2001/08/24 19:34:21 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.12 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1995 Theo de Raadt
@@ -44,10 +44,12 @@
#include <sys/device.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
-#include "machine/autoconf.h"
-#include "machine/cpu.h"
-#include "machine/frame.h"
-#include "machine/pmap.h"
+
+#include <machine/autoconf.h>
+#include <machine/cpu.h>
+#include <machine/frame.h>
+#include <machine/locore.h>
+#include <machine/pmap.h>
#include "pcctwo.h"
#include "syscon.h"
@@ -60,14 +62,18 @@
int vmematch __P((struct device *, void *, void *));
void vmeattach __P((struct device *, struct device *, void *));
-void vme2chip_init __P((struct vmesoftc *sc));
-u_long vme2chip_map __P((u_long base, int len, int dwidth));
+void vme2chip_init __P((struct vmesoftc *));
+u_long vme2chip_map __P((u_long, int, int));
int vme2abort __P((void *));
int sysconabort __P((void *));
-int intr_findvec __P((int start, int end));
+void * vmemap __P((struct vmesoftc *, void *, int, int));
+void vmeunmap __P((void *, int));
+int vmeprint __P((void *, const char *));
+
+void vmesyscon_init __P((struct vmesoftc *));
-static int vmebustype;
-static int vmevecbase;
+int vmebustype;
+int vmevecbase;
struct vme2reg *sys_vme2 = NULL;
diff --git a/sys/arch/mvme88k/dev/vmel.c b/sys/arch/mvme88k/dev/vmel.c
index cc70108b3d4..8c91db1892b 100644
--- a/sys/arch/mvme88k/dev/vmel.c
+++ b/sys/arch/mvme88k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: vmel.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -59,6 +59,14 @@ struct cfdriver vmel_cd = {
NULL, "vmel", DV_DULL, 0
};
+int vmelscan __P((struct device *, void *, void*));
+int vmelopen __P((dev_t, int, int));
+int vmelclose __P((dev_t, int, int));
+int vmelioctl __P((dev_t, int, caddr_t, int, struct proc *));
+int vmelread __P((dev_t, struct uio *, int));
+int vmelwrite __P((dev_t, struct uio *, int));
+int vmelmmap __P((dev_t, int, int));
+
int
vmelmatch(parent, cf, args)
struct device *parent;
diff --git a/sys/arch/mvme88k/dev/vmes.c b/sys/arch/mvme88k/dev/vmes.c
index 180f6ef6c8b..4832d7f73cc 100644
--- a/sys/arch/mvme88k/dev/vmes.c
+++ b/sys/arch/mvme88k/dev/vmes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmes.c,v 1.4 2001/06/14 21:30:35 miod Exp $ */
+/* $OpenBSD: vmes.c,v 1.5 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -59,6 +59,14 @@ struct cfdriver vmes_cd = {
NULL, "vmes", DV_DULL, 0
};
+int vmesscan __P((struct device *, void *, void*));
+int vmesopen __P((dev_t, int, int));
+int vmesclose __P((dev_t, int, int));
+int vmesioctl __P((dev_t, int, caddr_t, int, struct proc *));
+int vmesread __P((dev_t, struct uio *, int));
+int vmeswrite __P((dev_t, struct uio *, int));
+int vmesmmap __P((dev_t, int, int));
+
int
vmesmatch(parent, cf, args)
struct device *parent;
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index 5271a7ff0a1..de33a9e745f 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.8 2001/06/25 00:43:14 mickey Exp $ */
+/* $OpenBSD: vs.c,v 1.9 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -58,14 +58,14 @@
#include <machine/param.h>
#if defined(mvme88k)
- #include <mvme88k/dev/vsreg.h>
- #include <mvme88k/dev/vsvar.h>
- #include <mvme88k/dev/vme.h> /* vme_findvec() */
- #include <machine/mmu.h> /* DMA_CACHE_SYNC, etc... */
+#include <mvme88k/dev/vsreg.h>
+#include <mvme88k/dev/vsvar.h>
+#include <mvme88k/dev/vme.h> /* vme_findvec() */
+#include <machine/mmu.h> /* DMA_CACHE_SYNC, etc... */
#else
- #include <mvme68k/dev/vsreg.h>
- #include <mvme68k/dev/vsvar.h>
- #include <mvme68k/dev/vme.h> /* vme_findvec() */
+#include <mvme68k/dev/vsreg.h>
+#include <mvme68k/dev/vsvar.h>
+#include <mvme68k/dev/vme.h> /* vme_findvec() */
#endif /* mvme88k */
int vs_checkintr __P((struct vs_softc *, struct scsi_xfer *, int *));
@@ -79,11 +79,15 @@ int vs_poll __P((struct vs_softc *, struct scsi_xfer *));
void vs_scsidone __P((struct vs_softc *, struct scsi_xfer *, int));
M328_CQE * vs_getcqe __P((struct vs_softc *));
M328_IOPB * vs_getiopb __P((struct vs_softc *));
+void vs_copy __P((void *, void *, unsigned short));
+void vs_zero __P((void *, u_long));
+int do_vspoll __P((struct vs_softc *, int));
+void thaw_queue __P((struct vs_softc *, u_int8_t));
+void vs_link_sg_element __P((sg_list_element_t *, vm_offset_t, int));
+void vs_link_sg_list __P((sg_list_element_t *, vm_offset_t, int));
static __inline__ void vs_clear_return_info __P((struct vs_softc *));
-extern u_int kvtop();
-
/*
* 16 bit 's' memory functions. MVME328 is a D16 board.
* We must program with that in mind or else...
@@ -425,7 +429,7 @@ vs_chksense(xs)
miopb->iopb_EVCT = (u_char)sc->sc_evec;
miopb->iopb_LEVEL = 0; /*sc->sc_ipl;*/
miopb->iopb_ADDR = ADDR_MOD;
- LV(miopb->iopb_BUFF, kvtop(&xs->sense));
+ LV(miopb->iopb_BUFF, kvtop((vm_offset_t)&xs->sense));
LV(miopb->iopb_LENGTH, sizeof(struct scsi_sense_data));
vs_zero(mc, sizeof(M328_CQE));
@@ -999,7 +1003,7 @@ vs_build_memory_structure(xs, iopb)
level = 0;
virt = starting_point_virt = (vm_offset_t)xs->data;
- point1_phys = starting_point_phys = kvtop(xs->data);
+ point1_phys = starting_point_phys = kvtop((vm_offset_t)xs->data);
len = xs->datalen;
/*
* Check if we need scatter/gather
diff --git a/sys/arch/mvme88k/dev/vsvar.h b/sys/arch/mvme88k/dev/vsvar.h
index 367719b7295..1b1022d5b51 100644
--- a/sys/arch/mvme88k/dev/vsvar.h
+++ b/sys/arch/mvme88k/dev/vsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsvar.h,v 1.3 2001/03/07 01:57:56 miod Exp $ */
+/* $OpenBSD: vsvar.h,v 1.4 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1990 The Regents of the University of California.
@@ -47,7 +47,7 @@
#define DMAMAXIO (MAXPHYS/NBPG+1)
#define LO(x) (u_short)((unsigned long)x & 0x0000FFFF)
#define HI(x) (u_short)((unsigned long)x >> 16)
-#define OFF(x) (u_short)((long)kvtop(x) - (long)kvtop(sc->sc_vsreg))
+#define OFF(x) (u_short)((long)kvtop((vm_offset_t)x) - (long)kvtop((vm_offset_t)sc->sc_vsreg))
#define vs_name(sc) (sc)->sc_dev.dv_xname
/**************** Scater/Gather Stuff *******************/
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index 9d277fbd0d7..1cd64de6b72 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.8 2001/06/27 05:44:49 nate Exp $ */
+/* $OpenBSD: vx.c,v 1.9 2001/08/26 02:37:07 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -39,22 +39,26 @@
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/device.h>
+#include <sys/syslog.h>
+
#include <machine/cpu.h>
#include <machine/autoconf.h>
+
#include <dev/cons.h>
+
#include <mvme88k/dev/vxreg.h>
-#include <sys/syslog.h>
+
#include "pcctwo.h"
#if NPCCTWO > 0
- #include <mvme88k/dev/pcctworeg.h>
- #include <mvme88k/dev/vme.h>
+#include <mvme88k/dev/pcctworeg.h>
+#include <mvme88k/dev/vme.h>
#endif
#include <machine/psl.h>
#define splvx() spltty()
#ifdef DEBUG
- #undef DEBUG
+#undef DEBUG
#endif
#define DEBUG_KERN 1
@@ -139,7 +143,19 @@ int vxioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p));
void vxstart __P((struct tty *tp));
int vxstop __P((struct tty *tp, int flag));
-static void vxputc __P((struct vxsoftc *sc, int port, u_char c));
+void vxputc __P((struct vxsoftc *sc, int port, u_char c));
+
+struct tty * vxtty __P((dev_t));
+short dtr_ctl __P((struct vxsoftc *, int, int));
+short rts_ctl __P((struct vxsoftc *, int, int));
+short flush_ctl __P((struct vxsoftc *, int, int));
+u_short vxtspeed __P((int));
+void read_chars __P((struct vxsoftc *, int));
+void ccode __P((struct vxsoftc *, int, char));
+void wzero __P((void *, size_t));
+int create_free_queue __P((struct vxsoftc *));
+void print_dump __P((struct vxsoftc *));
+struct envelope *get_cmd_tail __P((struct vxsoftc *));
struct cfattach vx_ca = {
sizeof(struct vxsoftc), vxmatch, vxattach
@@ -152,7 +168,6 @@ struct cfdriver vx_cd = {
#define VX_UNIT(x) (int)(minor(x) / 9)
#define VX_PORT(x) (int)(minor(x) % 9)
-extern int cputyp;
struct envelope *bpp_wait;
unsigned int board_addr;
@@ -267,9 +282,9 @@ dtr_ctl(sc, port, on)
short
rts_ctl(sc, port, on)
-struct vxsoftc *sc;
-int port;
-int on;
+ struct vxsoftc *sc;
+ int port;
+ int on;
{
struct packet pkt;
bzero(&pkt, sizeof(struct packet));
@@ -289,9 +304,9 @@ int on;
short
flush_ctl(sc, port, which)
-struct vxsoftc *sc;
-int port;
-int which;
+ struct vxsoftc *sc;
+ int port;
+ int which;
{
struct packet pkt;
bzero(&pkt, sizeof(struct packet));
@@ -809,7 +824,7 @@ vxstop(tp, flag)
return 0;
}
-static void
+void
vxputc(sc, port, c)
struct vxsoftc *sc;
int port;
@@ -823,7 +838,8 @@ vxputc(sc, port, c)
return;
}
-u_short vxtspeed(speed)
+u_short
+vxtspeed(speed)
int speed;
{
switch (speed) {
@@ -1323,7 +1339,7 @@ wzero(void *addr, size_t size)
int
create_free_queue(sc)
-struct vxsoftc *sc;
+ struct vxsoftc *sc;
{
int i;
struct envelope *envp;
@@ -1711,4 +1727,3 @@ vx_init(sc)
return 0;
}
}
-