-/* $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.
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 */
-/* $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.
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
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);
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);
*/
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);
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);
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);
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);
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);
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);
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);
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)) {
}
#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;
}
/*
*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;
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
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
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;
}
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;
-/* $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
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 *));
-/* $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
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 *));
-/* $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
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
};
/*
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;
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;
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;
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;
-/* $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
/* 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 *);
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;
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;
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;
-/* $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
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
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;
}
-/* $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
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 *));
-/* $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
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;
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);
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 +
-/* $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
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));
-/* $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
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
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;
*/
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;
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);
}
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) {
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));
}
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));
}
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);
-/* $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
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;
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);
-/* $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
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;
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);
-/* $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
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)
-/* $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
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
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);
}
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) {
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));
}
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));
}
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);
-/* $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
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
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);
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
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) {
-/* $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
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
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);
}
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) {
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));
}
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));
}
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);
-/* $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
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
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);
}
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) {
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));
}
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));
}
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);
-/* $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
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
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)];
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;
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;
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;
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;
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;
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;
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;
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;
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;