Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amiga CFATTACH_DECL_NEW, device_t, cfdata_t



details:   https://anonhg.NetBSD.org/src/rev/73eea71ec5da
branches:  trunk
changeset: 765688:73eea71ec5da
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jun 03 00:52:22 2011 +0000

description:
CFATTACH_DECL_NEW, device_t, cfdata_t

diffstat:

 sys/arch/amiga/amiga/autoconf.c |  20 +++++++-------
 sys/arch/amiga/dev/a2kbbc.c     |  14 +++++-----
 sys/arch/amiga/dev/a34kbbc.c    |  14 +++++-----
 sys/arch/amiga/dev/clock.c      |  18 ++++++------
 sys/arch/amiga/dev/fd.c         |  53 +++++++++++++++++++++-------------------
 sys/arch/amiga/dev/grf.c        |  16 ++++++------
 sys/arch/amiga/dev/gvpbus.c     |  14 +++++-----
 sys/arch/amiga/dev/kbd.c        |  16 ++++++------
 sys/arch/amiga/dev/msc.c        |  14 +++++-----
 sys/arch/amiga/dev/zbus.c       |  16 ++++++------
 10 files changed, 99 insertions(+), 96 deletions(-)

diffs (truncated from 704 to 300 lines):

diff -r be57192e4ac4 -r 73eea71ec5da sys/arch/amiga/amiga/autoconf.c
--- a/sys/arch/amiga/amiga/autoconf.c   Fri Jun 03 00:16:27 2011 +0000
+++ b/sys/arch/amiga/amiga/autoconf.c   Fri Jun 03 00:52:22 2011 +0000
@@ -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 @@
 #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 @@
  * 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 @@
 void
 config_console(void)
 {
-       struct cfdata *cf;
+       cfdata_t cf;
 
        config_init();
 
@@ -229,11 +229,11 @@
 /*
  * 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 @@
  * "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);
diff -r be57192e4ac4 -r 73eea71ec5da sys/arch/amiga/dev/a2kbbc.c
--- a/sys/arch/amiga/dev/a2kbbc.c       Fri Jun 03 00:16:27 2011 +0000
+++ b/sys/arch/amiga/dev/a2kbbc.c       Fri Jun 03 00:52:22 2011 +0000
@@ -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 @@
 
 #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 @@
 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 @@
  * 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));
diff -r be57192e4ac4 -r 73eea71ec5da sys/arch/amiga/dev/a34kbbc.c
--- a/sys/arch/amiga/dev/a34kbbc.c      Fri Jun 03 00:16:27 2011 +0000
+++ b/sys/arch/amiga/dev/a34kbbc.c      Fri Jun 03 00:52:22 2011 +0000
@@ -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 @@
 
 #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 @@
 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 @@
  * 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));
diff -r be57192e4ac4 -r 73eea71ec5da sys/arch/amiga/dev/clock.c
--- a/sys/arch/amiga/dev/clock.c        Fri Jun 03 00:16:27 2011 +0000
+++ b/sys/arch/amiga/dev/clock.c        Fri Jun 03 00:52:22 2011 +0000
@@ -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 @@
  * 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 @@
        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 @@
  * 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 @@
  * 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;
diff -r be57192e4ac4 -r 73eea71ec5da sys/arch/amiga/dev/fd.c
--- a/sys/arch/amiga/dev/fd.c   Fri Jun 03 00:16:27 2011 +0000
+++ b/sys/arch/amiga/dev/fd.c   Fri Jun 03 00:52:22 2011 +0000
@@ -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 @@
  * 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 @@
        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 @@
 };
 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 @@
 
 struct dkdriver fddkdriver = { fdstrategy };
 
-CFATTACH_DECL(fdc, sizeof(struct device),
+CFATTACH_DECL_NEW(fdc, 0,
     fdcmatch, fdcattach, NULL, NULL);
 
 /*



Home | Main Index | Thread Index | Old Index