diff options
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/dev/bugtty.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/cl.c | 64 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/clock.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/fooip.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/if_ie.c | 18 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/if_le.c | 18 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/ipic.c | 13 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/lp.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/mc.c | 15 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/memc.c | 11 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/nvram.c | 27 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/pcc.c | 13 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/pcctwo.c | 13 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/siopdma.c | 12 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/sram.c | 23 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vme.c | 17 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vmel.c | 23 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/vmes.c | 23 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/zs.c | 38 |
19 files changed, 218 insertions, 154 deletions
diff --git a/sys/arch/mvme68k/dev/bugtty.c b/sys/arch/mvme68k/dev/bugtty.c index 5b3bb9d96b7..4afc0bcc423 100644 --- a/sys/arch/mvme68k/dev/bugtty.c +++ b/sys/arch/mvme68k/dev/bugtty.c @@ -1,4 +1,4 @@ -/* $Id: bugtty.c,v 1.2 1995/11/07 08:48:51 deraadt Exp $ */ +/* $OpenBSD: bugtty.c,v 1.3 1996/04/28 11:05:59 deraadt Exp $ */ /* * Copyright (c) 1995 Dale Rahn. @@ -50,9 +50,12 @@ int bugttymatch __P((struct device *parent, void *self, void *aux)); void bugttyattach __P((struct device *parent, struct device *self, void *aux)); -struct cfdriver bugttycd = { - NULL, "bugtty", bugttymatch, bugttyattach, - DV_TTY, sizeof(struct device) +struct cfattach bugtty_ca = { + sizeof(struct device), bugttymatch, bugttyattach +}; + +struct cfdriver bugtty_cd = { + NULL, "bugtty", DV_TTY, 0 }; /* prototypes */ diff --git a/sys/arch/mvme68k/dev/cl.c b/sys/arch/mvme68k/dev/cl.c index 5408b2aea5a..6f4e761ee79 100644 --- a/sys/arch/mvme68k/dev/cl.c +++ b/sys/arch/mvme68k/dev/cl.c @@ -1,4 +1,4 @@ -/* $Id: cl.c,v 1.9 1995/12/16 19:42:39 rahnds Exp $ */ +/* $OpenBSD: cl.c,v 1.10 1996/04/28 11:06:00 deraadt Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -185,8 +185,12 @@ static void clputc __P((struct clsoftc *sc, int unit, u_char c)); static u_char clgetc __P((struct clsoftc *sc, int *channel)); static void cloutput __P( (struct tty *tp)); -struct cfdriver clcd = { - NULL, "cl", clprobe, clattach, DV_TTY, sizeof(struct clsoftc), 0 +struct cfattach cl_ca = { + sizeof(struct clsoftc), clprobe, clattach +}; + +struct cfdriver cl_cd = { + NULL, "cl", DV_TTY, 0 }; #define CLCDBUF 80 @@ -205,8 +209,8 @@ struct tty * cltty(dev) int unit, channel; struct clsoftc *sc; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (NULL); } channel = CL_CHANNEL(dev); @@ -419,7 +423,7 @@ int clmctl (dev, bits, how) int s; struct clsoftc *sc; /* should only be called with valid device */ - sc = (struct clsoftc *) clcd.cd_devs[CL_UNIT(dev)]; + sc = (struct clsoftc *) cl_cd.cd_devs[CL_UNIT(dev)]; /* printf("mctl: dev %x, bits %x, how %x,\n",dev, bits, how); */ @@ -515,8 +519,8 @@ int clopen (dev, flag, mode, p) struct tty *tp; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (ENODEV); } channel = CL_CHANNEL(dev); @@ -655,8 +659,8 @@ int clparam(tp, t) dev = tp->t_dev; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (ENODEV); } channel = CL_CHANNEL(dev); @@ -682,8 +686,8 @@ void cloutput(tp) dev = tp->t_dev; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return; } channel = CL_CHANNEL(dev); @@ -720,8 +724,8 @@ int clclose (dev, flag, mode, p) struct clsoftc *sc; int s; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (ENODEV); } channel = CL_CHANNEL(dev); @@ -760,8 +764,8 @@ int flag; struct cl_info *cl; struct clsoftc *sc; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (ENODEV); } channel = CL_CHANNEL(dev); @@ -781,8 +785,8 @@ int clwrite (dev, uio, flag) struct cl_info *cl; struct clsoftc *sc; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (ENODEV); } channel = CL_CHANNEL(dev); @@ -805,8 +809,8 @@ int clioctl (dev, cmd, data, flag, p) struct cl_info *cl; struct clsoftc *sc; unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return (ENODEV); } channel = CL_CHANNEL(dev); @@ -1118,9 +1122,9 @@ cl_chkinput() if (dopoll == 0) return; - for (unit = 0; unit < clcd.cd_ndevs; unit++) { - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + for (unit = 0; unit < cl_cd.cd_ndevs; unit++) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { continue; } if (cl_instat(sc)) { @@ -1384,8 +1388,8 @@ clstart(tp) } #endif unit = CL_UNIT(dev); - if (unit >= clcd.cd_ndevs || - (sc = (struct clsoftc *) clcd.cd_devs[unit]) == NULL) { + if (unit >= cl_cd.cd_ndevs || + (sc = (struct clsoftc *) cl_cd.cd_devs[unit]) == NULL) { return; } @@ -1771,7 +1775,7 @@ u_char *msg; /* *ptime = time.tv_sec; */ - log(LOG_WARNING, "%s%d[%d]: %s overrun\n", clcd.cd_name, + log(LOG_WARNING, "%s%d[%d]: %s overrun\n", cl_cd.cd_name, 0 /* fix */, channel, msg); } return; @@ -1781,7 +1785,7 @@ cl_parity (sc, channel) struct clsoftc *sc; int channel; { - log(LOG_WARNING, "%s%d[%d]: parity error\n", clcd.cd_name, 0, channel); + log(LOG_WARNING, "%s%d[%d]: parity error\n", cl_cd.cd_name, 0, channel); return; } void @@ -1789,7 +1793,7 @@ cl_frame (sc, channel) struct clsoftc *sc; int channel; { - log(LOG_WARNING, "%s%d[%d]: frame error\n", clcd.cd_name, 0, channel); + log(LOG_WARNING, "%s%d[%d]: frame error\n", cl_cd.cd_name, 0, channel); return; } void @@ -1797,7 +1801,7 @@ cl_break (sc, channel) struct clsoftc *sc; int channel; { - log(LOG_WARNING, "%s%d[%d]: break detected\n", clcd.cd_name, 0, channel); + log(LOG_WARNING, "%s%d[%d]: break detected\n", cl_cd.cd_name, 0, channel); return; } @@ -1847,7 +1851,7 @@ cl_dumpport(channel) cl_reg = cl_cons.cl_vaddr; - sc = (struct clsoftc *) clcd.cd_devs[0]; + sc = (struct clsoftc *) cl_cd.cd_devs[0]; s = splcl(); cl_reg->cl_car = (u_char) channel; diff --git a/sys/arch/mvme68k/dev/clock.c b/sys/arch/mvme68k/dev/clock.c index 69cea3a74a2..01157b04684 100644 --- a/sys/arch/mvme68k/dev/clock.c +++ b/sys/arch/mvme68k/dev/clock.c @@ -1,4 +1,4 @@ -/* $Id: clock.c,v 1.2 1995/11/07 08:48:53 deraadt Exp $ */ +/* $OpenBSD: clock.c,v 1.3 1996/04/28 11:06:02 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -119,9 +119,12 @@ struct clocksoftc { void clockattach __P((struct device *, struct device *, void *)); int clockmatch __P((struct device *, void *, void *)); -struct cfdriver clockcd = { - NULL, "clock", clockmatch, clockattach, - DV_DULL, sizeof(struct clocksoftc), 0 +struct cfattach clock_ca = { + sizeof(struct clocksoftc), clockmatch, clockattach +}; + +struct cfdriver clock_cd = { + NULL, "clock", DV_DULL, 0 }; int clockintr __P((void *)); diff --git a/sys/arch/mvme68k/dev/fooip.c b/sys/arch/mvme68k/dev/fooip.c index 810cdbfde00..56a183c9707 100644 --- a/sys/arch/mvme68k/dev/fooip.c +++ b/sys/arch/mvme68k/dev/fooip.c @@ -1,4 +1,4 @@ -/* $Id: fooip.c,v 1.2 1995/11/07 08:48:57 deraadt Exp $ */ +/* $OpenBSD: fooip.c,v 1.3 1996/04/28 11:06:03 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -68,9 +68,12 @@ struct fooipsoftc { void fooipattach __P((struct device *, struct device *, void *)); int fooipmatch __P((struct device *, void *, void *)); -struct cfdriver fooipcd = { - NULL, "fooip", fooipmatch, fooipattach, - DV_DULL, sizeof(struct fooipsoftc), 0 +struct cfattach fooip_ca = { + sizeof(struct fooipsoftc), fooipmatch, fooipattach +}; + +struct cfdriver fooip_cd = { + NULL, "fooip", DV_DULL, 0 }; int fooipintr __P((void *)); diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c index a1993ed86b0..f4c4ecddaa6 100644 --- a/sys/arch/mvme68k/dev/if_ie.c +++ b/sys/arch/mvme68k/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $Id: if_ie.c,v 1.3 1995/12/27 22:31:25 deraadt Exp $ */ +/* $OpenBSD: if_ie.c,v 1.4 1996/04/28 11:06:04 deraadt Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -323,8 +323,12 @@ int in_ietint = 0; int iematch(); void ieattach(); -struct cfdriver iecd = { - NULL, "ie", iematch, ieattach, DV_IFNET, sizeof(struct ie_softc) +struct cfattach ie_ca = { + sizeof(struct ie_softc), iematch, ieattach +}; + +struct cfdriver ie_cd = { + NULL, "ie", DV_IFNET, 0 }; /* @@ -489,7 +493,7 @@ ieattach(parent, self, aux) return; } ifp->if_unit = sc->sc_dev.dv_unit; - ifp->if_name = iecd.cd_name; + ifp->if_name = ie_cd.cd_name; ifp->if_start = iestart; ifp->if_ioctl = ieioctl; ifp->if_watchdog = iewatchdog; @@ -550,7 +554,7 @@ void iewatchdog(unit) short unit; { - struct ie_softc *sc = iecd.cd_devs[unit]; + struct ie_softc *sc = ie_cd.cd_devs[unit]; log(LOG_ERR, "%s: device timeout\n", sc->sc_dev.dv_xname); ++sc->sc_arpcom.ac_if.if_oerrors; @@ -1288,7 +1292,7 @@ void iestart(ifp) struct ifnet *ifp; { - struct ie_softc *sc = iecd.cd_devs[ifp->if_unit]; + struct ie_softc *sc = ie_cd.cd_devs[ifp->if_unit]; struct mbuf *m0, *m; u_char *buffer; u_short len; @@ -1820,7 +1824,7 @@ ieioctl(ifp, cmd, data) u_long cmd; caddr_t data; { - struct ie_softc *sc = iecd.cd_devs[ifp->if_unit]; + struct ie_softc *sc = ie_cd.cd_devs[ifp->if_unit]; struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; diff --git a/sys/arch/mvme68k/dev/if_le.c b/sys/arch/mvme68k/dev/if_le.c index 0ab0e9edd6e..89dfcfce69a 100644 --- a/sys/arch/mvme68k/dev/if_le.c +++ b/sys/arch/mvme68k/dev/if_le.c @@ -1,4 +1,4 @@ -/* $Id: if_le.c,v 1.3 1995/12/27 22:31:29 deraadt Exp $ */ +/* $OpenBSD: if_le.c,v 1.4 1996/04/28 11:06:05 deraadt Exp $ */ /*- * Copyright (c) 1982, 1992, 1993 @@ -147,8 +147,14 @@ struct le_softc { /* autoconfiguration driver */ void leattach(struct device *, struct device *, void *); int lematch(struct device *, void *, void *); -struct cfdriver lecd = - { NULL, "le", lematch, leattach, DV_IFNET, sizeof(struct le_softc) }; + +struct cfattach le_ca = { + sizeof(struct le_softc), lematch, leattach +}; + +struct cfdriver le_cd = { + NULL, "le", DV_IFNET, 0 +}; /* Forwards */ void leattach(struct device *, struct device *, void *); @@ -415,7 +421,7 @@ int leinit(unit) int unit; { - register struct le_softc *sc = lecd.cd_devs[unit]; + register struct le_softc *sc = le_cd.cd_devs[unit]; register struct ifnet *ifp = &sc->sc_if; register int s; @@ -438,7 +444,7 @@ void lestart(ifp) register struct ifnet *ifp; { - register struct le_softc *sc = lecd.cd_devs[ifp->if_unit]; + register struct le_softc *sc = le_cd.cd_devs[ifp->if_unit]; register struct letmd *tmd; register struct mbuf *m; register int len; @@ -817,7 +823,7 @@ leioctl(ifp, cmd, data) caddr_t data; { register struct ifaddr *ifa; - register struct le_softc *sc = lecd.cd_devs[ifp->if_unit]; + register struct le_softc *sc = le_cd.cd_devs[ifp->if_unit]; register struct lereg1 *ler1; int s = splnet(), error = 0; diff --git a/sys/arch/mvme68k/dev/ipic.c b/sys/arch/mvme68k/dev/ipic.c index 92b718872ea..9b21d7794f4 100644 --- a/sys/arch/mvme68k/dev/ipic.c +++ b/sys/arch/mvme68k/dev/ipic.c @@ -1,4 +1,4 @@ -/* $Id: ipic.c,v 1.2 1995/11/07 08:49:04 deraadt Exp $ */ +/* $OpenBSD: ipic.c,v 1.3 1996/04/28 11:06:06 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -52,9 +52,12 @@ void ipicattach __P((struct device *, struct device *, void *)); int ipicmatch __P((struct device *, void *, void *)); -struct cfdriver ipiccd = { - NULL, "ipic", ipicmatch, ipicattach, - DV_DULL, sizeof(struct ipicsoftc), 0 +struct cfattach ipic_ca = { + sizeof(struct ipicsoftc), ipicmatch, ipicattach +}; + +struct cfdriver ipic_cd = { + NULL, "ipic", DV_DULL, 0 }; int @@ -140,7 +143,7 @@ ipicscan(parent, child, args) oca.ca_master = (void *)sc; oca.ca_name = cf->cf_driver->cd_name; - if ((*cf->cf_driver->cd_match)(parent, cf, &oca) == 0) { + if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) { unmapiodev(ipv, NBPG); continue; } diff --git a/sys/arch/mvme68k/dev/lp.c b/sys/arch/mvme68k/dev/lp.c index 29a3f15ef59..0df47782827 100644 --- a/sys/arch/mvme68k/dev/lp.c +++ b/sys/arch/mvme68k/dev/lp.c @@ -1,4 +1,4 @@ -/* $Id: lp.c,v 1.2 1995/11/07 08:49:08 deraadt Exp $ */ +/* $OpenBSD: lp.c,v 1.3 1996/04/28 11:06:07 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -57,9 +57,12 @@ struct lpsoftc { void lpattach __P((struct device *, struct device *, void *)); int lpmatch __P((struct device *, void *, void *)); -struct cfdriver lpcd = { - NULL, "lp", lpmatch, lpattach, - DV_DULL, sizeof(struct lpsoftc), 0 +struct cfattach lp_ca = { + sizeof(struct lpsoftc), lpmatch, lpattach +}; + +struct cfdriver lp_cd = { + NULL, "lp", DV_DULL, 0 }; int lpintr __P((void *)); diff --git a/sys/arch/mvme68k/dev/mc.c b/sys/arch/mvme68k/dev/mc.c index d4d2c358c07..d21bb85031e 100644 --- a/sys/arch/mvme68k/dev/mc.c +++ b/sys/arch/mvme68k/dev/mc.c @@ -1,4 +1,4 @@ -/* $Id: mc.c,v 1.2 1995/11/07 08:49:09 deraadt Exp $ */ +/* $OpenBSD: mc.c,v 1.3 1996/04/28 11:06:08 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -65,9 +65,12 @@ void mcattach __P((struct device *, struct device *, void *)); int mcmatch __P((struct device *, void *, void *)); int mcabort __P((struct frame *)); -struct cfdriver mccd = { - NULL, "mc", mcmatch, mcattach, - DV_DULL, sizeof(struct mcsoftc), 0 +struct cfattach mc_ca = { + sizeof(struct mcsoftc), mcmatch, mcattach +}; + +struct cfdriver mc_cd = { + NULL, "mc", DV_DULL, 0 }; struct mcreg *sys_mc = NULL; @@ -129,7 +132,7 @@ mc_scan(parent, child, args) oca.ca_bustype = BUS_MC; oca.ca_master = (void *)sc->sc_mc; oca.ca_name = cf->cf_driver->cd_name; - if ((*cf->cf_driver->cd_match)(parent, cf, &oca) == 0) + if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) return (0); config_attach(parent, cf, &oca, mc_print); return (1); @@ -208,7 +211,7 @@ void mc_enableflashwrite(on) int on; { - struct mcsoftc *sc = (struct mcsoftc *) mccd.cd_devs[0]; + struct mcsoftc *sc = (struct mcsoftc *) mc_cd.cd_devs[0]; volatile char *ena, x; ena = sc->sc_vaddr + diff --git a/sys/arch/mvme68k/dev/memc.c b/sys/arch/mvme68k/dev/memc.c index 044da4a2963..6a4763c6c4d 100644 --- a/sys/arch/mvme68k/dev/memc.c +++ b/sys/arch/mvme68k/dev/memc.c @@ -1,4 +1,4 @@ -/* $Id: memc.c,v 1.2 1995/11/07 08:49:12 deraadt Exp $ */ +/* $OpenBSD: memc.c,v 1.3 1996/04/28 11:06:09 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -65,9 +65,12 @@ struct memcsoftc { void memcattach __P((struct device *, struct device *, void *)); int memcmatch __P((struct device *, void *, void *)); -struct cfdriver memccd = { - NULL, "memc", memcmatch, memcattach, - DV_DULL, sizeof(struct memcsoftc), 0 +struct cfattach memc_ca = { + sizeof(struct memcsoftc), memcmatch, memcattach +}; + +struct cfdriver memc_cd = { + NULL, "memc", DV_DULL, 0 }; int memcintr __P((struct frame *frame)); diff --git a/sys/arch/mvme68k/dev/nvram.c b/sys/arch/mvme68k/dev/nvram.c index e383ae32d8e..5e63f0118ac 100644 --- a/sys/arch/mvme68k/dev/nvram.c +++ b/sys/arch/mvme68k/dev/nvram.c @@ -1,4 +1,4 @@ -/* $Id: nvram.c,v 1.2 1995/11/07 08:49:17 deraadt Exp $ */ +/* $OpenBSD: nvram.c,v 1.3 1996/04/28 11:06:11 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -56,9 +56,12 @@ struct nvramsoftc { void nvramattach __P((struct device *, struct device *, void *)); int nvrammatch __P((struct device *, void *, void *)); -struct cfdriver nvramcd = { - NULL, "nvram", nvrammatch, nvramattach, - DV_DULL, sizeof(struct nvramsoftc), 0 +struct cfattach nvram_ca = { + sizeof(struct nvramsoftc), nvrammatch, nvramattach +}; + +struct cfdriver nvram_cd = { + NULL, "nvram", DV_DULL, 0 }; int @@ -238,7 +241,7 @@ timetochip(c) inittodr(base) time_t base; { - struct nvramsoftc *sc = (struct nvramsoftc *) nvramcd.cd_devs[0]; + struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0]; register struct clockreg *cl = sc->sc_regs; int sec, min, hour, day, mon, year; int badbase = 0, waszero = base == 0; @@ -292,7 +295,7 @@ inittodr(base) */ resettodr() { - struct nvramsoftc *sc = (struct nvramsoftc *) nvramcd.cd_devs[0]; + struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0]; register struct clockreg *cl = sc->sc_regs; struct chiptime c; @@ -316,8 +319,8 @@ nvramopen(dev, flag, mode) dev_t dev; int flag, mode; { - if (minor(dev) >= nvramcd.cd_ndevs || - nvramcd.cd_devs[minor(dev)] == NULL) + if (minor(dev) >= nvram_cd.cd_ndevs || + nvram_cd.cd_devs[minor(dev)] == NULL) return (ENODEV); return (0); } @@ -341,7 +344,7 @@ nvramioctl(dev, cmd, data, flag, p) struct proc *p; { int unit = minor(dev); - struct nvramsoftc *sc = (struct nvramsoftc *) nvramcd.cd_devs[unit]; + struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit]; int error = 0; switch (cmd) { @@ -363,7 +366,7 @@ nvramread(dev, uio, flags) int flags; { int unit = minor(dev); - struct nvramsoftc *sc = (struct nvramsoftc *) nvramcd.cd_devs[unit]; + struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit]; return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags)); } @@ -376,7 +379,7 @@ nvramwrite(dev, uio, flags) int flags; { int unit = minor(dev); - struct nvramsoftc *sc = (struct nvramsoftc *) nvramcd.cd_devs[unit]; + struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit]; return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags)); } @@ -392,7 +395,7 @@ nvrammmap(dev, off, prot) int off, prot; { int unit = minor(dev); - struct nvramsoftc *sc = (struct nvramsoftc *) nvramcd.cd_devs[unit]; + struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[unit]; if (minor(dev) != 0) return (-1); diff --git a/sys/arch/mvme68k/dev/pcc.c b/sys/arch/mvme68k/dev/pcc.c index b01f60a301e..0ed0b221e0b 100644 --- a/sys/arch/mvme68k/dev/pcc.c +++ b/sys/arch/mvme68k/dev/pcc.c @@ -1,4 +1,4 @@ -/* $Id: pcc.c,v 1.2 1995/11/07 08:49:20 deraadt Exp $ */ +/* $OpenBSD: pcc.c,v 1.3 1996/04/28 11:06:12 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -65,9 +65,12 @@ void pccattach __P((struct device *, struct device *, void *)); int pccmatch __P((struct device *, void *, void *)); int pccabort __P((struct frame *)); -struct cfdriver pcccd = { - NULL, "pcc", pccmatch, pccattach, - DV_DULL, sizeof(struct pccsoftc), 0 +struct cfattach pcc_ca = { + sizeof(struct pccsoftc), pccmatch, pccattach +}; + +struct cfdriver pcc_cd = { + NULL, "pcc", DV_DULL, 0 }; struct pccreg *sys_pcc = NULL; @@ -128,7 +131,7 @@ pcc_scan(parent, child, args) oca.ca_bustype = BUS_PCC; oca.ca_master = (void *)sc->sc_pcc; oca.ca_name = cf->cf_driver->cd_name; - if ((*cf->cf_driver->cd_match)(parent, cf, &oca) == 0) + if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) return (0); config_attach(parent, cf, &oca, pcc_print); return (1); diff --git a/sys/arch/mvme68k/dev/pcctwo.c b/sys/arch/mvme68k/dev/pcctwo.c index c85903a9332..04ac124d3b0 100644 --- a/sys/arch/mvme68k/dev/pcctwo.c +++ b/sys/arch/mvme68k/dev/pcctwo.c @@ -1,4 +1,4 @@ -/* $Id: pcctwo.c,v 1.2 1995/11/07 08:49:22 deraadt Exp $ */ +/* $OpenBSD: pcctwo.c,v 1.3 1996/04/28 11:06:13 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -63,9 +63,12 @@ struct pcctwosoftc { void pcctwoattach __P((struct device *, struct device *, void *)); int pcctwomatch __P((struct device *, void *, void *)); -struct cfdriver pcctwocd = { - NULL, "pcctwo", pcctwomatch, pcctwoattach, - DV_DULL, sizeof(struct pcctwosoftc), 0 +struct cfattach pcctwo_ca = { + sizeof(struct pcctwosoftc), pcctwomatch, pcctwoattach +}; + +struct cfdriver pcctwo_cd = { + NULL, "pcctwo", DV_DULL, 0 }; struct pcctworeg *sys_pcc2 = NULL; @@ -130,7 +133,7 @@ pcctwo_scan(parent, child, args) oca.ca_bustype = BUS_PCCTWO; oca.ca_master = (void *)sc->sc_pcc2; oca.ca_name = cf->cf_driver->cd_name; - if ((*cf->cf_driver->cd_match)(parent, cf, &oca) == 0) + if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) return (0); config_attach(parent, cf, &oca, pcctwo_print); return (1); diff --git a/sys/arch/mvme68k/dev/siopdma.c b/sys/arch/mvme68k/dev/siopdma.c index be86ae23008..898e7c34b93 100644 --- a/sys/arch/mvme68k/dev/siopdma.c +++ b/sys/arch/mvme68k/dev/siopdma.c @@ -1,4 +1,4 @@ -/* $Id: siopdma.c,v 1.2 1995/11/07 08:49:32 deraadt Exp $ */ +/* $OpenBSD: siopdma.c,v 1.3 1996/04/28 11:06:20 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -78,9 +78,13 @@ struct scsi_device afsc_scsidev = { NULL, /* Use default done routine */ }; -struct cfdriver siopcd = { - NULL, "siop", afscmatch, afscattach, - DV_DULL, sizeof(struct siop_softc), NULL, 0 }; +struct cfattach siop_ca = { + sizeof(struct siop_softc), afscmatch, afscattach, +}; + +struct cfdriver siop_cd = { + NULL, "siop", DV_DULL, 0 +}; int afscmatch(pdp, vcf, args) diff --git a/sys/arch/mvme68k/dev/sram.c b/sys/arch/mvme68k/dev/sram.c index 5eec35bf854..048d12f32e2 100644 --- a/sys/arch/mvme68k/dev/sram.c +++ b/sys/arch/mvme68k/dev/sram.c @@ -1,4 +1,4 @@ -/* $Id: sram.c,v 1.2 1995/11/07 08:49:35 deraadt Exp $ */ +/* $OpenBSD: sram.c,v 1.3 1996/04/28 11:06:19 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -62,9 +62,12 @@ struct sramsoftc { void sramattach __P((struct device *, struct device *, void *)); int srammatch __P((struct device *, void *, void *)); -struct cfdriver sramcd = { - NULL, "sram", srammatch, sramattach, - DV_DULL, sizeof(struct sramsoftc), 0 +struct cfattach sram_ca = { + sizeof(struct sramsoftc), srammatch, sramattach +}; + +struct cfdriver sram_cd = { + NULL, "sram", DV_DULL, 0 }; int @@ -149,8 +152,8 @@ sramopen(dev, flag, mode) dev_t dev; int flag, mode; { - if (minor(dev) >= sramcd.cd_ndevs || - sramcd.cd_devs[minor(dev)] == NULL) + if (minor(dev) >= sram_cd.cd_ndevs || + sram_cd.cd_devs[minor(dev)] == NULL) return (ENODEV); return (0); } @@ -174,7 +177,7 @@ sramioctl(dev, cmd, data, flag, p) struct proc *p; { int unit = minor(dev); - struct sramsoftc *sc = (struct sramsoftc *) sramcd.cd_devs[unit]; + struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit]; int error = 0; switch (cmd) { @@ -196,7 +199,7 @@ sramread(dev, uio, flags) int flags; { int unit = minor(dev); - struct sramsoftc *sc = (struct sramsoftc *) sramcd.cd_devs[unit]; + struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit]; return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags)); } @@ -209,7 +212,7 @@ sramwrite(dev, uio, flags) int flags; { int unit = minor(dev); - struct sramsoftc *sc = (struct sramsoftc *) sramcd.cd_devs[unit]; + struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit]; return (memdevrw(sc->sc_vaddr, sc->sc_len, uio, flags)); } @@ -220,7 +223,7 @@ srammmap(dev, off, prot) int off, prot; { int unit = minor(dev); - struct sramsoftc *sc = (struct sramsoftc *) sramcd.cd_devs[unit]; + struct sramsoftc *sc = (struct sramsoftc *) sram_cd.cd_devs[unit]; if (minor(dev) != 0) return (-1); diff --git a/sys/arch/mvme68k/dev/vme.c b/sys/arch/mvme68k/dev/vme.c index 36d7d974b0d..4dc9982f228 100644 --- a/sys/arch/mvme68k/dev/vme.c +++ b/sys/arch/mvme68k/dev/vme.c @@ -1,4 +1,4 @@ -/* $Id: vme.c,v 1.2 1995/11/07 08:49:36 deraadt Exp $ */ +/* $OpenBSD: vme.c,v 1.3 1996/04/28 11:06:18 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -72,9 +72,12 @@ int vme2abort __P((struct frame *frame)); static int vmebustype; -struct cfdriver vmecd = { - NULL, "vme", vmematch, vmeattach, - DV_DULL, sizeof(struct vmesoftc), 0 +struct cfattach vme_ca = { + sizeof(struct vmesoftc), vmematch, vmeattach +}; + +struct cfdriver vme_cd = { + NULL, "vme", DV_DULL, 0 }; int @@ -291,7 +294,7 @@ vmescan(parent, child, args, bustype) oca.ca_vaddr = (void *)-1; oca.ca_master = (void *)sc; oca.ca_name = cf->cf_driver->cd_name; - if ((*cf->cf_driver->cd_match)(parent, cf, &oca) == 0) { + if ((*cf->cf_attach->ca_match)(parent, cf, &oca) == 0) { if (oca.ca_vaddr != (void *)-1) vmeunmap(oca.ca_vaddr, oca.ca_len); return (0); @@ -355,7 +358,7 @@ vmeintr_establish(vec, ih) int vec; struct intrhand *ih; { - struct vmesoftc *sc = (struct vmesoftc *) vmecd.cd_devs[0]; + struct vmesoftc *sc = (struct vmesoftc *) vme_cd.cd_devs[0]; #if NPCC > 0 struct vme1reg *vme1; #endif @@ -542,7 +545,7 @@ int vme2abort(frame) struct frame *frame; { - struct vmesoftc *sc = (struct vmesoftc *)vmecd.cd_devs[0]; + struct vmesoftc *sc = (struct vmesoftc *)vme_cd.cd_devs[0]; struct vme2reg *vme2 = (struct vme2reg *)sc->sc_vaddr; if (vme2->vme2_irqstat & VME2_IRQ_AB == 0) { diff --git a/sys/arch/mvme68k/dev/vmel.c b/sys/arch/mvme68k/dev/vmel.c index dabe78930ef..ede73a86c22 100644 --- a/sys/arch/mvme68k/dev/vmel.c +++ b/sys/arch/mvme68k/dev/vmel.c @@ -1,4 +1,4 @@ -/* $Id: vmel.c,v 1.2 1995/11/07 08:49:37 deraadt Exp $ */ +/* $OpenBSD: vmel.c,v 1.3 1996/04/28 11:06:16 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -56,9 +56,12 @@ struct vmelsoftc { struct vmesoftc *sc_vme; }; -struct cfdriver vmelcd = { - NULL, "vmel", vmelmatch, vmelattach, - DV_DULL, sizeof(struct vmelsoftc), 0 +struct cfattach vmel_ca = { + sizeof(struct vmelsoftc), vmelmatch, vmelattach +}; + +struct cfdriver vmel_cd = { + NULL, "vmel", DV_DULL, 0 }; int @@ -97,8 +100,8 @@ vmelopen(dev, flag, mode) dev_t dev; int flag, mode; { - if (minor(dev) >= vmelcd.cd_ndevs || - vmelcd.cd_devs[minor(dev)] == NULL) + if (minor(dev) >= vmel_cd.cd_ndevs || + vmel_cd.cd_devs[minor(dev)] == NULL) return (ENODEV); return (0); } @@ -122,7 +125,7 @@ vmelioctl(dev, cmd, data, flag, p) struct proc *p; { int unit = minor(dev); - struct vmelsoftc *sc = (struct vmelsoftc *) vmelcd.cd_devs[unit]; + struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit]; int error = 0; switch (cmd) { @@ -140,7 +143,7 @@ vmelread(dev, uio, flags) int flags; { int unit = minor(dev); - struct vmelsoftc *sc = (struct vmelsoftc *) vmelcd.cd_devs[unit]; + struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit]; return (vmerw(sc->sc_vme, uio, flags, BUS_VMEL)); } @@ -152,7 +155,7 @@ vmelwrite(dev, uio, flags) int flags; { int unit = minor(dev); - struct vmelsoftc *sc = (struct vmelsoftc *) vmelcd.cd_devs[unit]; + struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit]; return (vmerw(sc->sc_vme, uio, flags, BUS_VMEL)); } @@ -163,7 +166,7 @@ vmelmmap(dev, off, prot) int off, prot; { int unit = minor(dev); - struct vmelsoftc *sc = (struct vmelsoftc *) vmelcd.cd_devs[unit]; + struct vmelsoftc *sc = (struct vmelsoftc *) vmel_cd.cd_devs[unit]; caddr_t pa; pa = vmepmap(sc->sc_vme, (caddr_t)off, NBPG, BUS_VMEL); diff --git a/sys/arch/mvme68k/dev/vmes.c b/sys/arch/mvme68k/dev/vmes.c index 23818bdad2d..f4ffa05ae16 100644 --- a/sys/arch/mvme68k/dev/vmes.c +++ b/sys/arch/mvme68k/dev/vmes.c @@ -1,4 +1,4 @@ -/* $Id: vmes.c,v 1.2 1995/11/07 08:49:38 deraadt Exp $ */ +/* $OpenBSD: vmes.c,v 1.3 1996/04/28 11:06:16 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -56,9 +56,12 @@ struct vmessoftc { struct vmesoftc *sc_vme; }; -struct cfdriver vmescd = { - NULL, "vmes", vmesmatch, vmesattach, - DV_DULL, sizeof(struct vmessoftc), 0 +struct cfattach vmes_ca = { + sizeof(struct vmessoftc), vmesmatch, vmesattach +}; + +struct cfdriver vmes_cd = { + NULL, "vmes", DV_DULL, 0 }; int @@ -97,8 +100,8 @@ vmesopen(dev, flag, mode) dev_t dev; int flag, mode; { - if (minor(dev) >= vmescd.cd_ndevs || - vmescd.cd_devs[minor(dev)] == NULL) + if (minor(dev) >= vmes_cd.cd_ndevs || + vmes_cd.cd_devs[minor(dev)] == NULL) return (ENODEV); return (0); } @@ -122,7 +125,7 @@ vmesioctl(dev, cmd, data, flag, p) struct proc *p; { int unit = minor(dev); - struct vmessoftc *sc = (struct vmessoftc *) vmescd.cd_devs[unit]; + struct vmessoftc *sc = (struct vmessoftc *) vmes_cd.cd_devs[unit]; int error = 0; switch (cmd) { @@ -140,7 +143,7 @@ vmesread(dev, uio, flags) int flags; { int unit = minor(dev); - struct vmessoftc *sc = (struct vmessoftc *) vmescd.cd_devs[unit]; + struct vmessoftc *sc = (struct vmessoftc *) vmes_cd.cd_devs[unit]; return (vmerw(sc->sc_vme, uio, flags, BUS_VMES)); } @@ -152,7 +155,7 @@ vmeswrite(dev, uio, flags) int flags; { int unit = minor(dev); - struct vmessoftc *sc = (struct vmessoftc *) vmescd.cd_devs[unit]; + struct vmessoftc *sc = (struct vmessoftc *) vmes_cd.cd_devs[unit]; return (vmerw(sc->sc_vme, uio, flags, BUS_VMES)); } @@ -163,7 +166,7 @@ vmesmmap(dev, off, prot) int off, prot; { int unit = minor(dev); - struct vmessoftc *sc = (struct vmessoftc *) vmescd.cd_devs[unit]; + struct vmessoftc *sc = (struct vmessoftc *) vmes_cd.cd_devs[unit]; caddr_t pa; pa = vmepmap(sc->sc_vme, (caddr_t)off, NBPG, BUS_VMES); diff --git a/sys/arch/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c index dfc23c6b0a6..757ab943d02 100644 --- a/sys/arch/mvme68k/dev/zs.c +++ b/sys/arch/mvme68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $Id: zs.c,v 1.2 1995/11/07 08:49:39 deraadt Exp $ */ +/* $OpenBSD: zs.c,v 1.3 1996/04/28 11:06:14 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -149,8 +149,12 @@ void zs_softint __P((void)); void zsattach __P((struct device *, struct device *, void *)); int zsmatch __P((struct device *, void *, void *)); -struct cfdriver zscd = { - NULL, "zs", zsmatch, zsattach, DV_TTY, sizeof(struct zssoftc), 0 +struct cfattach zs_ca = { + sizeof(struct zssoftc), zsmatch, zsattach +}; + +struct cfdriver zs_cd = { + NULL, "zs", DV_TTY, 0 }; int @@ -320,8 +324,8 @@ zsopen(dev, flag, mode, p) struct zs *zp; struct zssoftc *sc; - if (zsunit(dev) >= zscd.cd_ndevs || - (sc = (struct zssoftc *) zscd.cd_devs[zsunit(dev)]) == NULL) + if (zsunit(dev) >= zs_cd.cd_ndevs || + (sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(dev)]) == NULL) return (ENODEV); zp = &sc->sc_zs[zsside(dev)]; @@ -360,8 +364,8 @@ zsclose(dev, flag, mode, p) struct zssoftc *sc; int s; - if (zsunit(dev) > zscd.cd_ndevs || - (sc = (struct zssoftc *) zscd.cd_devs[zsunit(dev)]) == NULL) + if (zsunit(dev) > zs_cd.cd_ndevs || + (sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(dev)]) == NULL) return (ENODEV); zp = &sc->sc_zs[zsside(dev)]; tp = zp->tty; @@ -384,7 +388,7 @@ zsread(dev, uio, flag) struct uio *uio; int flag; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[zsunit(dev)]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(dev)]; struct zs *zp = &sc->sc_zs[zsside(dev)]; struct tty *tp = zp->tty; @@ -398,7 +402,7 @@ zswrite(dev, uio, flag) struct uio *uio; int flag; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[zsunit(dev)]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(dev)]; struct zs *zp = &sc->sc_zs[zsside(dev)]; struct tty *tp = zp->tty; @@ -412,7 +416,7 @@ zsioctl(dev, cmd, data, flag, p) int cmd, flag; struct proc *p; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[zsunit(dev)]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(dev)]; struct zs *zp = &sc->sc_zs[zsside(dev)]; struct tty *tp = zp->tty; register struct sccregs *scc = &zp->scc; @@ -469,7 +473,7 @@ zsparam(tp, t) struct tty *tp; struct termios *t; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[zsunit(tp->t_dev)]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(tp->t_dev)]; struct zs *zp = &sc->sc_zs[zsside(tp->t_dev)]; register int s; @@ -493,7 +497,7 @@ void zsstart(tp) struct tty *tp; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[zsunit(tp->t_dev)]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(tp->t_dev)]; struct zs *zp = &sc->sc_zs[zsside(tp->t_dev)]; register int s, n; @@ -518,7 +522,7 @@ zsstop(tp, flag) struct tty *tp; int flag; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[zsunit(tp->t_dev)]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[zsunit(tp->t_dev)]; struct zs *zp = &sc->sc_zs[zsside(tp->t_dev)]; int s, n; @@ -713,7 +717,7 @@ int zsirq(unit) int unit; { - struct zssoftc *sc = (struct zssoftc *) zscd.cd_devs[unit]; + struct zssoftc *sc = (struct zssoftc *) zs_cd.cd_devs[unit]; register struct zs *zp = &sc->sc_zs[0]; register int ipend, x; @@ -846,10 +850,10 @@ zs_softint() int unit, side; s = splzs(); - for (unit = 0; unit < zscd.cd_ndevs; ++unit) { - if (zscd.cd_devs[unit] == NULL) + for (unit = 0; unit < zs_cd.cd_ndevs; ++unit) { + if (zs_cd.cd_devs[unit] == NULL) continue; - zp = &((struct zssoftc *) zscd.cd_devs[unit])->sc_zs[0]; + zp = &((struct zssoftc *) zs_cd.cd_devs[unit])->sc_zs[0]; for (side = 0; side < 2; ++side, ++zp) { if ((zp->hflags & ZH_SIRQ) == 0) continue; |