CFATTACH_DECL_NEW, device_t, cfdata_t
This commit is contained in:
parent
dbaed33ad8
commit
0d242d5fa3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.107 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.107 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -51,9 +51,9 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $");
|
||||
#endif
|
||||
|
||||
static void findroot(void);
|
||||
void mbattach(struct device *, struct device *, void *);
|
||||
void mbattach(device_t, device_t, void *);
|
||||
int mbprint(void *, const char *);
|
||||
int mbmatch(struct device *, struct cfdata *, void *);
|
||||
int mbmatch(device_t, cfdata_t, void *);
|
||||
|
||||
#include <sys/kernel.h>
|
||||
|
||||
@ -157,10 +157,10 @@ matchname(const char *fp, const char *sp)
|
||||
* by checking for NULL.
|
||||
*/
|
||||
int
|
||||
amiga_config_found(struct cfdata *pcfp, struct device *pdp, void *auxp, cfprint_t pfn)
|
||||
amiga_config_found(cfdata_t pcfp, device_t pdp, void *auxp, cfprint_t pfn)
|
||||
{
|
||||
struct device temp;
|
||||
struct cfdata *cf;
|
||||
cfdata_t cf;
|
||||
const struct cfattach *ca;
|
||||
|
||||
if (amiga_realconfig)
|
||||
@ -195,7 +195,7 @@ amiga_config_found(struct cfdata *pcfp, struct device *pdp, void *auxp, cfprint_
|
||||
void
|
||||
config_console(void)
|
||||
{
|
||||
struct cfdata *cf;
|
||||
cfdata_t cf;
|
||||
|
||||
config_init();
|
||||
|
||||
@ -229,11 +229,11 @@ config_console(void)
|
||||
/*
|
||||
* mainbus driver
|
||||
*/
|
||||
CFATTACH_DECL(mainbus, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(mainbus, 0,
|
||||
mbmatch, mbattach, NULL, NULL);
|
||||
|
||||
int
|
||||
mbmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
mbmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
#if 0 /*
|
||||
* XXX is this right? but we need to be found twice
|
||||
@ -254,7 +254,7 @@ mbmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
* "find" all the things that should be there.
|
||||
*/
|
||||
void
|
||||
mbattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
mbattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
printf("\n");
|
||||
config_found(dp, __UNCONST("clock"), simple_devprint);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: a2kbbc.c,v 1.22 2011/02/08 20:20:08 rmind Exp $ */
|
||||
/* $NetBSD: a2kbbc.c,v 1.23 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.22 2011/02/08 20:20:08 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.23 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -55,10 +55,10 @@ __KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.22 2011/02/08 20:20:08 rmind Exp $");
|
||||
|
||||
#include <dev/clock_subr.h>
|
||||
|
||||
int a2kbbc_match(struct device *, struct cfdata *, void *);
|
||||
void a2kbbc_attach(struct device *, struct device *, void *);
|
||||
int a2kbbc_match(device_t, cfdata_t, void *);
|
||||
void a2kbbc_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL(a2kbbc, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(a2kbbc, 0,
|
||||
a2kbbc_match, a2kbbc_attach, NULL, NULL);
|
||||
|
||||
void *a2kclockaddr;
|
||||
@ -67,7 +67,7 @@ int a2kusettod(todr_chip_handle_t, struct clock_ymdhms *);
|
||||
static struct todr_chip_handle a2ktodr;
|
||||
|
||||
int
|
||||
a2kbbc_match(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
a2kbbc_match(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
struct clock_ymdhms dt;
|
||||
static int a2kbbc_matched = 0;
|
||||
@ -98,7 +98,7 @@ a2kbbc_match(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
* Attach us to the rtc function pointers.
|
||||
*/
|
||||
void
|
||||
a2kbbc_attach(struct device *pdp, struct device *dp, void *auxp)
|
||||
a2kbbc_attach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
printf("\n");
|
||||
a2kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: a34kbbc.c,v 1.21 2011/02/08 20:20:08 rmind Exp $ */
|
||||
/* $NetBSD: a34kbbc.c,v 1.22 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.21 2011/02/08 20:20:08 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.22 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -55,10 +55,10 @@ __KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.21 2011/02/08 20:20:08 rmind Exp $");
|
||||
|
||||
#include <dev/clock_subr.h>
|
||||
|
||||
int a34kbbc_match(struct device *, struct cfdata *, void *);
|
||||
void a34kbbc_attach(struct device *, struct device *, void *);
|
||||
int a34kbbc_match(device_t, cfdata_t, void *);
|
||||
void a34kbbc_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL(a34kbbc, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(a34kbbc, 0,
|
||||
a34kbbc_match, a34kbbc_attach, NULL, NULL);
|
||||
|
||||
void *a34kclockaddr;
|
||||
@ -67,7 +67,7 @@ int a34kusettod(todr_chip_handle_t, struct clock_ymdhms *);
|
||||
static struct todr_chip_handle a34ktodr;
|
||||
|
||||
int
|
||||
a34kbbc_match(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
a34kbbc_match(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
struct clock_ymdhms dt;
|
||||
static int a34kbbc_matched = 0;
|
||||
@ -94,7 +94,7 @@ a34kbbc_match(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
* Attach us to the rtc function pointers.
|
||||
*/
|
||||
void
|
||||
a34kbbc_attach(struct device *pdp, struct device *dp, void *auxp)
|
||||
a34kbbc_attach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
printf("\n");
|
||||
a34kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock.c,v 1.52 2011/02/08 20:20:08 rmind Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.53 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.52 2011/02/08 20:20:08 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.53 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -79,10 +79,10 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.52 2011/02/08 20:20:08 rmind Exp $");
|
||||
* periods where N is the value loaded into the counter.
|
||||
*/
|
||||
|
||||
int clockmatch(struct device *, struct cfdata *, void *);
|
||||
void clockattach(struct device *, struct device *, void *);
|
||||
int clockmatch(device_t, cfdata_t, void *);
|
||||
void clockattach(device_t, device_t, void *);
|
||||
void cpu_initclocks(void);
|
||||
static void calibrate_delay(struct device *);
|
||||
static void calibrate_delay(device_t);
|
||||
|
||||
/* the clocks run at NTSC: 715.909kHz or PAL: 709.379kHz.
|
||||
We're using a 100 Hz clock. */
|
||||
@ -103,11 +103,11 @@ static struct timecounter clk_timecounter = {
|
||||
NULL, /* next */
|
||||
};
|
||||
|
||||
CFATTACH_DECL(clock, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(clock, 0,
|
||||
clockmatch, clockattach, NULL, NULL);
|
||||
|
||||
int
|
||||
clockmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
clockmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
if (matchname("clock", auxp))
|
||||
return(1);
|
||||
@ -118,7 +118,7 @@ clockmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
* Start the real-time clock.
|
||||
*/
|
||||
void
|
||||
clockattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
clockattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
const char *clockchip;
|
||||
unsigned short interval;
|
||||
@ -326,7 +326,7 @@ clk_getcounter(struct timecounter *tc)
|
||||
* off by 2.4%
|
||||
*/
|
||||
static void
|
||||
calibrate_delay(struct device *dp)
|
||||
calibrate_delay(device_t dp)
|
||||
{
|
||||
unsigned long t1, t2;
|
||||
extern u_int32_t delaydivisor;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.85 2010/12/20 00:25:25 matt Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.86 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.85 2010/12/20 00:25:25 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.86 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -144,7 +144,7 @@ struct fdtype {
|
||||
* floppy disk device data
|
||||
*/
|
||||
struct fd_softc {
|
||||
struct device sc_dv; /* generic device info; must come first */
|
||||
device_t sc_dev; /* generic device info; must come first */
|
||||
struct disk dkdev; /* generic disk info */
|
||||
struct bufq_state *bufq;/* queue pending I/O operations */
|
||||
struct buf curbuf; /* state of current I/O operation */
|
||||
@ -189,11 +189,11 @@ struct fdcargs {
|
||||
int unit;
|
||||
};
|
||||
|
||||
int fdcmatch(struct device *, struct cfdata *, void *);
|
||||
void fdcattach(struct device *, struct device *, void *);
|
||||
int fdcmatch(device_t, cfdata_t, void *);
|
||||
void fdcattach(device_t, device_t, void *);
|
||||
int fdcprint(void *, const char *);
|
||||
int fdmatch(struct device *, struct cfdata *, void *);
|
||||
void fdattach(struct device *, struct device *, void *);
|
||||
int fdmatch(device_t, cfdata_t, void *);
|
||||
void fdattach(device_t, device_t, void *);
|
||||
|
||||
void fdintr(int);
|
||||
void fdidxintr(void);
|
||||
@ -241,7 +241,7 @@ struct fdtype fdtype[] = {
|
||||
};
|
||||
int nfdtype = __arraycount(fdtype);
|
||||
|
||||
CFATTACH_DECL(fd, sizeof(struct fd_softc),
|
||||
CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc),
|
||||
fdmatch, fdattach, NULL, NULL);
|
||||
|
||||
extern struct cfdriver fd_cd;
|
||||
@ -264,7 +264,7 @@ const struct cdevsw fd_cdevsw = {
|
||||
|
||||
struct dkdriver fddkdriver = { fdstrategy };
|
||||
|
||||
CFATTACH_DECL(fdc, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(fdc, 0,
|
||||
fdcmatch, fdcattach, NULL, NULL);
|
||||
|
||||
/*
|
||||
@ -325,7 +325,7 @@ CFATTACH_DECL(fdc, sizeof(struct device),
|
||||
|
||||
|
||||
int
|
||||
fdcmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
fdcmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
static int fdc_matched = 0;
|
||||
|
||||
@ -342,7 +342,7 @@ fdcmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
}
|
||||
|
||||
void
|
||||
fdcattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
fdcattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
struct fdcargs args;
|
||||
|
||||
@ -374,7 +374,7 @@ fdcprint(void *auxp, const char *pnp)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
fdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
fdmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
struct fdcargs *fdap;
|
||||
|
||||
@ -387,7 +387,7 @@ fdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
}
|
||||
|
||||
void
|
||||
fdattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
fdattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
struct fdcargs *ap;
|
||||
struct fd_softc *sc;
|
||||
@ -395,6 +395,7 @@ fdattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
|
||||
ap = auxp;
|
||||
sc = device_private(dp);
|
||||
sc->sc_dev = dp;
|
||||
|
||||
bufq_alloc(&sc->bufq, "disksort", BUFQ_SORT_CYLINDER);
|
||||
callout_init(&sc->calibrate_ch, 0);
|
||||
@ -415,7 +416,7 @@ fdattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
/*
|
||||
* Initialize and attach the disk structure.
|
||||
*/
|
||||
disk_init(&sc->dkdev, sc->sc_dv.dv_xname, &fddkdriver);
|
||||
disk_init(&sc->dkdev, device_xname(sc->sc_dev), &fddkdriver);
|
||||
disk_attach(&sc->dkdev);
|
||||
|
||||
/*
|
||||
@ -1467,8 +1468,8 @@ fddmadone(struct fd_softc *sc, int timeo)
|
||||
*/
|
||||
sc->flags &= ~FDF_DIRTY;
|
||||
if (timeo)
|
||||
printf("%s: write of track cache timed out.\n",
|
||||
sc->sc_dv.dv_xname);
|
||||
aprint_error_dev(sc->sc_dev,
|
||||
"write of track cache timed out.\n");
|
||||
if (sc->flags & FDF_JUSTFLUSH) {
|
||||
sc->flags &= ~FDF_JUSTFLUSH;
|
||||
/*
|
||||
@ -1496,8 +1497,8 @@ fddmadone(struct fd_softc *sc, int timeo)
|
||||
else {
|
||||
#ifdef FDDEBUG
|
||||
if (timeo)
|
||||
printf("%s: fddmadone: cache load timed out.\n",
|
||||
sc->sc_dv.dv_xname);
|
||||
aprint_debug_dev(sc->sc_dev,
|
||||
"fddmadone: cache load timed out.\n");
|
||||
#endif
|
||||
if (sc->retried >= sc->retries) {
|
||||
sc->retried = 0;
|
||||
@ -1579,7 +1580,7 @@ fddone(struct fd_softc *sc)
|
||||
|
||||
biodone(bp);
|
||||
nobuf:
|
||||
fdfindwork(device_unit(&sc->sc_dv));
|
||||
fdfindwork(device_unit(sc->sc_dev));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1789,8 +1790,8 @@ amrawtocache(struct fd_softc *sc)
|
||||
again:
|
||||
if (doagain == 0 || (rp = srp = fdfindsync(srp, erp)) == NULL) {
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("%s: corrupted track (%d) data.\n",
|
||||
sc->sc_dv.dv_xname, sc->cachetrk);
|
||||
aprint_error_dev(sc->sc_dev, "corrupted track (%d) data.\n",
|
||||
sc->cachetrk);
|
||||
#endif
|
||||
return(-1);
|
||||
}
|
||||
@ -1812,8 +1813,9 @@ again:
|
||||
}
|
||||
if (((info >> 16) & 0xff) != sc->cachetrk) {
|
||||
#ifdef DEBUG
|
||||
printf("%s: incorrect track found: 0x%lx %d\n",
|
||||
sc->sc_dv.dv_xname, info, sc->cachetrk);
|
||||
aprint_debug_dev(sc->sc_dev,
|
||||
"incorrect track found: 0x%lx %d\n",
|
||||
info, sc->cachetrk);
|
||||
#endif
|
||||
goto again;
|
||||
}
|
||||
@ -1952,8 +1954,9 @@ msrawtocache(struct fd_softc *sc)
|
||||
*/
|
||||
if ((rp = (u_short *)fdfindsync((u_long *)rp, (u_long *)erp)) == NULL) {
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("%s: corrupted track (%d) data.\n",
|
||||
sc->sc_dv.dv_xname, sc->cachetrk);
|
||||
aprint_normal_dev(sc->sc_dev,
|
||||
"corrupted track (%d) data.\n",
|
||||
sc->cachetrk);
|
||||
#endif
|
||||
return(-1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: grf.c,v 1.54 2011/02/08 20:20:08 rmind Exp $ */
|
||||
/* $NetBSD: grf.c,v 1.55 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.54 2011/02/08 20:20:08 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.55 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
/*
|
||||
* Graphics display driver for the Amiga
|
||||
@ -82,15 +82,15 @@ int grfon(dev_t);
|
||||
int grfoff(dev_t);
|
||||
int grfsinfo(dev_t, struct grfdyninfo *);
|
||||
|
||||
void grfattach(struct device *, struct device *, void *);
|
||||
int grfmatch(struct device *, struct cfdata *, void *);
|
||||
void grfattach(device_t, device_t, void *);
|
||||
int grfmatch(device_t, cfdata_t, void *);
|
||||
int grfprint(void *, const char *);
|
||||
/*
|
||||
* pointers to grf drivers device structs
|
||||
*/
|
||||
struct grf_softc *grfsp[NGRF];
|
||||
|
||||
CFATTACH_DECL(grf, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(grf, 0,
|
||||
grfmatch, grfattach, NULL, NULL);
|
||||
|
||||
dev_type_open(grfopen);
|
||||
@ -106,14 +106,14 @@ const struct cdevsw grf_cdevsw = {
|
||||
/*
|
||||
* only used in console init.
|
||||
*/
|
||||
static struct cfdata *cfdata;
|
||||
static cfdata_t cfdata;
|
||||
|
||||
/*
|
||||
* match if the unit of grf matches its perspective
|
||||
* low level board driver.
|
||||
*/
|
||||
int
|
||||
grfmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
grfmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
|
||||
if (cfp->cf_unit != ((struct grf_softc *)pdp)->g_unit)
|
||||
@ -128,7 +128,7 @@ grfmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
* durring console init.
|
||||
*/
|
||||
void
|
||||
grfattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
grfattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
struct grf_softc *gp;
|
||||
int maj;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gvpbus.c,v 1.24 2009/10/26 19:16:54 cegger Exp $ */
|
||||
/* $NetBSD: gvpbus.c,v 1.25 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gvpbus.c,v 1.24 2009/10/26 19:16:54 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gvpbus.c,v 1.25 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
@ -40,17 +40,17 @@ __KERNEL_RCSID(0, "$NetBSD: gvpbus.c,v 1.24 2009/10/26 19:16:54 cegger Exp $");
|
||||
#include <amiga/dev/zbusvar.h>
|
||||
#include <amiga/dev/gvpbusvar.h>
|
||||
|
||||
void gvpbusattach(struct device *, struct device *, void *);
|
||||
int gvpbusmatch(struct device *, struct cfdata *, void *);
|
||||
void gvpbusattach(device_t, device_t, void *);
|
||||
int gvpbusmatch(device_t, cfdata_t, void *);
|
||||
int gvpbusprint(void *auxp, const char *);
|
||||
|
||||
extern int sbic_no_dma; /* Kludge for A1291 - mlh */
|
||||
|
||||
CFATTACH_DECL(gvpbus, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(gvpbus, 0,
|
||||
gvpbusmatch, gvpbusattach, NULL, NULL);
|
||||
|
||||
int
|
||||
gvpbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
gvpbusmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
struct zbus_args *zap;
|
||||
|
||||
@ -69,7 +69,7 @@ gvpbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
}
|
||||
|
||||
void
|
||||
gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
gvpbusattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
struct zbus_args *zap;
|
||||
struct gvpbus_args ga;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kbd.c,v 1.53 2009/12/12 13:10:36 phx Exp $ */
|
||||
/* $NetBSD: kbd.c,v 1.54 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.53 2009/12/12 13:10:36 phx Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.54 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -143,14 +143,14 @@ struct kbd_softc {
|
||||
|
||||
int k_console; /* true if used as console keyboard */
|
||||
#if NWSKBD>0
|
||||
struct device *k_wskbddev; /* pointer to wskbd for sending strokes */
|
||||
device_t k_wskbddev; /* pointer to wskbd for sending strokes */
|
||||
int k_pollingmode; /* polling mode on? whatever it isss... */
|
||||
#endif
|
||||
};
|
||||
struct kbd_softc kbd_softc;
|
||||
|
||||
int kbdmatch(struct device *, struct cfdata *, void *);
|
||||
void kbdattach(struct device *, struct device *, void *);
|
||||
int kbdmatch(device_t, cfdata_t, void *);
|
||||
void kbdattach(device_t, device_t, void *);
|
||||
void kbdintr(int);
|
||||
void kbdstuffchar(u_char);
|
||||
|
||||
@ -160,7 +160,7 @@ int drkbdputc(u_int8_t);
|
||||
int drkbdputc2(u_int8_t, u_int8_t);
|
||||
int drkbdwaitfor(int);
|
||||
|
||||
CFATTACH_DECL(kbd, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(kbd, 0,
|
||||
kbdmatch, kbdattach, NULL, NULL);
|
||||
|
||||
dev_type_open(kbdopen);
|
||||
@ -177,7 +177,7 @@ const struct cdevsw kbd_cdevsw = {
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
kbdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
kbdmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
|
||||
if (matchname((char *)auxp, "kbd"))
|
||||
@ -187,7 +187,7 @@ kbdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
kbdattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
kbdattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
#ifdef DRACO
|
||||
kbdenable();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msc.c,v 1.43 2011/04/24 16:26:52 rmind Exp $ */
|
||||
/* $NetBSD: msc.c,v 1.44 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.43 2011/04/24 16:26:52 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.44 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include "msc.h"
|
||||
|
||||
@ -207,13 +207,13 @@ const struct speedtab *mscspeedtab;
|
||||
int mscmctl(dev_t dev, int bits, int howto);
|
||||
void mscmint(register void *data);
|
||||
|
||||
int mscmatch(struct device *, struct cfdata *, void *);
|
||||
void mscattach(struct device *, struct device *, void *);
|
||||
int mscmatch(device_t, cfdata_t, void *);
|
||||
void mscattach(device_t, device_t, void *);
|
||||
|
||||
#define SWFLAGS(dev) (msc->openflags | (MSCDIALIN(dev) ? 0 : TIOCFLAG_SOFTCAR))
|
||||
#define DEBUG_CD 0
|
||||
|
||||
CFATTACH_DECL(msc, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(msc, 0,
|
||||
mscmatch, mscattach, NULL, NULL);
|
||||
|
||||
dev_type_open(mscopen);
|
||||
@ -231,7 +231,7 @@ const struct cdevsw msc_cdevsw = {
|
||||
};
|
||||
|
||||
int
|
||||
mscmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
mscmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
struct zbus_args *zap;
|
||||
|
||||
@ -243,7 +243,7 @@ mscmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
}
|
||||
|
||||
void
|
||||
mscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
mscattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
volatile struct mscmemory *mscmem;
|
||||
struct mscdevice *msc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: zbus.c,v 1.62 2010/12/20 00:25:26 matt Exp $ */
|
||||
/* $NetBSD: zbus.c,v 1.63 2011/06/03 00:52:22 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.62 2010/12/20 00:25:26 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.63 2011/06/03 00:52:22 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
@ -218,9 +218,9 @@ static struct preconfdata preconftab[] = {
|
||||
static int npreconfent = sizeof(preconftab) / sizeof(struct preconfdata);
|
||||
|
||||
|
||||
void zbusattach(struct device *, struct device *, void *);
|
||||
void zbusattach(device_t, device_t, void *);
|
||||
int zbusprint(void *, const char *);
|
||||
int zbusmatch(struct device *, struct cfdata *, void *);
|
||||
int zbusmatch(device_t, cfdata_t, void *);
|
||||
void *zbusmap(void *, u_int);
|
||||
static const char *aconflookup(int, int);
|
||||
|
||||
@ -244,14 +244,14 @@ aconflookup(int mid, int pid)
|
||||
* mainbus driver
|
||||
*/
|
||||
|
||||
CFATTACH_DECL(zbus, sizeof(struct device),
|
||||
CFATTACH_DECL_NEW(zbus, 0,
|
||||
zbusmatch, zbusattach, NULL, NULL);
|
||||
|
||||
static struct cfdata *early_cfdata;
|
||||
static cfdata_t early_cfdata;
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
zbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
zbusmatch(device_t pdp, cfdata_t cfp, void *auxp)
|
||||
{
|
||||
|
||||
if (matchname(auxp, "zbus") == 0)
|
||||
@ -267,7 +267,7 @@ zbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
|
||||
* with that driver if matched else print a diag.
|
||||
*/
|
||||
void
|
||||
zbusattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
zbusattach(device_t pdp, device_t dp, void *auxp)
|
||||
{
|
||||
struct zbus_args za;
|
||||
struct preconfdata *pcp, *epcp;
|
||||
|
Loading…
Reference in New Issue
Block a user