Module Name:    src
Committed By:   matt
Date:           Fri Jun  3 07:35:37 UTC 2011

Modified Files:
        src/sys/arch/acorn32/acorn32: autoconf.c
        src/sys/arch/acorn32/conf: EB7500ATX
        src/sys/arch/acorn32/eb7500atx: rsbus.c
        src/sys/arch/acorn32/include: podulebus_machdep.h
        src/sys/arch/acorn32/mainbus: com_pioc.c fd.c lpt_pioc.c pioc.c
            wdc_pioc.c
        src/sys/arch/acorn32/podulebus: amps.c asc.c cosc.c csc.c if_ie.c
            netslot.c podulebus.c ptsc.c

Log Message:
device_t, cfdata_t, device_private, device_xname cleanup
CFATTACH_DECL_NEW for struct device only devices
bump SYMTAB_SPACE for EB7500ATX


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/acorn32/acorn32/autoconf.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/acorn32/conf/EB7500ATX
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/acorn32/eb7500atx/rsbus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/acorn32/include/podulebus_machdep.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/acorn32/mainbus/com_pioc.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/acorn32/mainbus/fd.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/acorn32/mainbus/lpt_pioc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/acorn32/mainbus/pioc.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/acorn32/mainbus/wdc_pioc.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/acorn32/podulebus/amps.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/acorn32/podulebus/asc.c \
    src/sys/arch/acorn32/podulebus/cosc.c \
    src/sys/arch/acorn32/podulebus/csc.c \
    src/sys/arch/acorn32/podulebus/ptsc.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/acorn32/podulebus/if_ie.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/acorn32/podulebus/netslot.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/acorn32/podulebus/podulebus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/acorn32/acorn32/autoconf.c
diff -u src/sys/arch/acorn32/acorn32/autoconf.c:1.16 src/sys/arch/acorn32/acorn32/autoconf.c:1.17
--- src/sys/arch/acorn32/acorn32/autoconf.c:1.16	Tue May 12 06:56:59 2009
+++ src/sys/arch/acorn32/acorn32/autoconf.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.16 2009/05/12 06:56:59 cegger Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.17 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.16 2009/05/12 06:56:59 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2011/06/03 07:35:37 matt Exp $");
 
 #include "opt_md.h"
 
@@ -185,7 +185,7 @@
 }
 
 void
-device_register(struct device *dev, void *aux)
+device_register(device_t dev, void *aux)
 {
 }
 /* End of autoconf.c */

Index: src/sys/arch/acorn32/conf/EB7500ATX
diff -u src/sys/arch/acorn32/conf/EB7500ATX:1.42 src/sys/arch/acorn32/conf/EB7500ATX:1.43
--- src/sys/arch/acorn32/conf/EB7500ATX:1.42	Sun Mar  6 17:08:18 2011
+++ src/sys/arch/acorn32/conf/EB7500ATX	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: EB7500ATX,v 1.42 2011/03/06 17:08:18 bouyer Exp $
+#	$NetBSD: EB7500ATX,v 1.43 2011/06/03 07:35:37 matt Exp $
 #
 #	EB7500ATX --- NetBSD/acorn32 complete configuration
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"EB7500ATX-$Revision: 1.42 $"
+#ident		"EB7500ATX-$Revision: 1.43 $"
 
 # estimated number of users
 maxusers	32
@@ -144,7 +144,7 @@
 options 	USERCONF	# userconf(4) support
 #options	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 #options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
-options		SYMTAB_SPACE=262144
+options		SYMTAB_SPACE=275000
 
 # Enable experimental buffer queue strategy for better responsiveness under 
 # high disk I/O load. Use it with caution - it's not proven to be stable yet.

Index: src/sys/arch/acorn32/eb7500atx/rsbus.c
diff -u src/sys/arch/acorn32/eb7500atx/rsbus.c:1.7 src/sys/arch/acorn32/eb7500atx/rsbus.c:1.8
--- src/sys/arch/acorn32/eb7500atx/rsbus.c:1.7	Wed Oct 21 16:16:24 2009
+++ src/sys/arch/acorn32/eb7500atx/rsbus.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rsbus.c,v 1.7 2009/10/21 16:16:24 rmind Exp $ */
+/* $NetBSD: rsbus.c,v 1.8 2011/06/03 07:35:37 matt Exp $ */
 
 /*
  * Copyright (c) 2002
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: rsbus.c,v 1.7 2009/10/21 16:16:24 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rsbus.c,v 1.8 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -45,25 +45,25 @@
 
 /* Declare prototypes */
 
-static int	rsbus_match(struct device *, struct cfdata *, void *);
-static void	rsbus_attach(struct device *, struct device *, void *);
+static int	rsbus_match(device_t, cfdata_t, void *);
+static void	rsbus_attach(device_t, device_t, void *);
 static int	rsbus_print(void *, const char *);
-static int	rsbus_search(struct device *, struct cfdata *,
+static int	rsbus_search(device_t, cfdata_t,
 			     const int *, void *);
 
 CFATTACH_DECL(rsbus, sizeof(struct rsbus_softc),
     rsbus_match, rsbus_attach, NULL, NULL);
  
 static int
-rsbus_match(struct device *parent, struct cfdata *cf, void *aux)
+rsbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	return(1);
 }
 
 static void
-rsbus_attach(struct device *parent, struct device *self, void *aux)
+rsbus_attach(device_t parent, device_t self, void *aux)
 {
-	struct rsbus_softc *sc = (void *) self;
+	struct rsbus_softc *sc = device_private(self);
 	sc->sc_iot = &rsbus_bs_tag;
 
 	printf("\n");
@@ -75,9 +75,9 @@
 }
 
 static int
-rsbus_search(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+rsbus_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
-	struct rsbus_softc *sc = (struct rsbus_softc *)parent;
+	struct rsbus_softc *sc = device_private(parent);
 	struct rsbus_attach_args sa;
 
 	sa.sa_iot = sc->sc_iot;
@@ -94,7 +94,7 @@
 static int
 rsbus_print(void *aux, const char *name)
 {
-        struct rsbus_attach_args *sa = (struct rsbus_attach_args*)aux;
+        struct rsbus_attach_args *sa = aux;
 
 	if (sa->sa_size)
 		aprint_normal(" addr 0x%lx", sa->sa_addr);
@@ -105,4 +105,3 @@
 
 	return (UNCONF);
 }
-

Index: src/sys/arch/acorn32/include/podulebus_machdep.h
diff -u src/sys/arch/acorn32/include/podulebus_machdep.h:1.2 src/sys/arch/acorn32/include/podulebus_machdep.h:1.3
--- src/sys/arch/acorn32/include/podulebus_machdep.h:1.2	Sat Mar 14 14:45:51 2009
+++ src/sys/arch/acorn32/include/podulebus_machdep.h	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus_machdep.h,v 1.2 2009/03/14 14:45:51 dsl Exp $ */
+/* $NetBSD: podulebus_machdep.h,v 1.3 2011/06/03 07:35:37 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -161,8 +161,8 @@
     bus_space_tag_t *);
 
 /* Used internally by the podulebus code */
-extern void netslotscan(struct device *);
-extern void poduleexamine(podule_t *, struct device *, int);
+extern void netslotscan(device_t);
+extern void poduleexamine(podule_t *, device_t, int);
 
 #endif
 

Index: src/sys/arch/acorn32/mainbus/com_pioc.c
diff -u src/sys/arch/acorn32/mainbus/com_pioc.c:1.14 src/sys/arch/acorn32/mainbus/com_pioc.c:1.15
--- src/sys/arch/acorn32/mainbus/com_pioc.c:1.14	Mon Apr 28 20:23:09 2008
+++ src/sys/arch/acorn32/mainbus/com_pioc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: com_pioc.c,v 1.14 2008/04/28 20:23:09 martin Exp $	*/
+/*	$NetBSD: com_pioc.c,v 1.15 2011/06/03 07:35:37 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: com_pioc.c,v 1.14 2008/04/28 20:23:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_pioc.c,v 1.15 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/systm.h>
 #include <sys/tty.h>
@@ -103,7 +103,7 @@
 extern bus_space_tag_t comconstag;	/* From pioc.c */
 
 /*
- * int com_pioc_probe(struct device *parent, struct cfdata *cf, void *aux)
+ * int com_pioc_probe(device_t parent, cfdata_t cf, void *aux)
  *
  * Make sure we are trying to attach a com device and then
  * probe for one.
@@ -141,7 +141,7 @@
 }
 
 /*
- * void com_pioc_attach(struct device *parent, struct device *self, void *aux)
+ * void com_pioc_attach(device_t parent, device_t self, void *aux)
  *
  * attach the com device
  */

Index: src/sys/arch/acorn32/mainbus/fd.c
diff -u src/sys/arch/acorn32/mainbus/fd.c:1.49 src/sys/arch/acorn32/mainbus/fd.c:1.50
--- src/sys/arch/acorn32/mainbus/fd.c:1.49	Thu Dec  9 05:14:28 2010
+++ src/sys/arch/acorn32/mainbus/fd.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.49 2010/12/09 05:14:28 uebayasi Exp $	*/
+/*	$NetBSD: fd.c,v 1.50 2011/06/03 07:35:37 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.49 2010/12/09 05:14:28 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.50 2011/06/03 07:35:37 matt Exp $");
 
 #include "opt_ddb.h"
 
@@ -174,9 +174,9 @@
 };
 
 /* controller driver configuration */
-int fdcprobe(struct device *, struct cfdata *, void *);
+int fdcprobe(device_t, cfdata_t, void *);
 int fdprint(void *, const char *);
-void fdcattach(struct device *, struct device *, void *);
+void fdcattach(device_t, device_t, void *);
 
 CFATTACH_DECL(fdc, sizeof(struct fdc_softc),
     fdcprobe, fdcattach, NULL, NULL);
@@ -249,8 +249,8 @@
 };
 
 /* floppy driver configuration */
-int fdprobe(struct device *, struct cfdata *, void *);
-void fdattach(struct device *, struct device *, void *);
+int fdprobe(device_t, cfdata_t, void *);
+void fdattach(device_t, device_t, void *);
 
 extern char floppy_read_fiq[], floppy_read_fiq_end[];
 extern char floppy_write_fiq[], floppy_write_fiq_end[];
@@ -289,7 +289,7 @@
 int fdcresult(struct fdc_softc *fdc);
 int out_fdc(bus_space_tag_t iot, bus_space_handle_t ioh, u_char x);
 void fdcstart(struct fdc_softc *fdc);
-void fdcstatus(struct device *dv, int n, const char *s);
+void fdcstatus(device_t dv, int n, const char *s);
 void fdctimeout(void *arg);
 void fdcpseudointr(void *arg);
 int fdcintr(void *);
@@ -299,7 +299,7 @@
 int fdformat(dev_t, struct ne7_fd_formb *, struct lwp *);
 
 int
-fdcprobe(struct device *parent, struct cfdata *cf, void *aux)
+fdcprobe(device_t parent, cfdata_t cf, void *aux)
 {
 	struct pioc_attach_args *pa = aux;
 	bus_space_tag_t iot;
@@ -361,9 +361,9 @@
 }
 
 void
-fdcattach(struct device *parent, struct device *self, void *aux)
+fdcattach(device_t parent, device_t self, void *aux)
 {
-	struct fdc_softc *fdc = (void *)self;
+	struct fdc_softc *fdc = device_private(self);
 	bus_space_tag_t iot;
 	bus_space_handle_t ioh;
 	struct pioc_attach_args *pa = aux;
@@ -388,10 +388,10 @@
 	callout_init(&fdc->sc_timo_ch, 0); 
 	callout_init(&fdc->sc_intr_ch, 0);
 
-	fdc->sc_ih = intr_claim(pa->pa_irq, IPL_BIO, "fdc",
-	    fdcintr, fdc);
+	fdc->sc_ih = intr_claim(pa->pa_irq, IPL_BIO, "fdc", fdcintr, fdc);
 	if (!fdc->sc_ih)
-		panic("%s: Cannot claim IRQ %d", self->dv_xname, pa->pa_irq);
+		panic("%s: Cannot claim IRQ %d",
+		    device_xname(self), pa->pa_irq);
 
 #if 0
 	/*
@@ -417,9 +417,9 @@
 }
 
 int
-fdprobe(struct device *parent, struct cfdata *cf, void *aux)
+fdprobe(device_t parent, cfdata_t cf, void *aux)
 {
-	struct fdc_softc *fdc = (void *)parent;
+	struct fdc_softc *fdc = device_private(parent);
 	struct fdc_attach_args *fa = aux;
 	int drive = fa->fa_drive;
 	bus_space_tag_t iot = fdc->sc_iot;
@@ -472,10 +472,10 @@
  * Controller is working, and drive responded.  Attach it.
  */
 void
-fdattach(struct device *parent, struct device *self, void *aux)
+fdattach(device_t parent, device_t self, void *aux)
 {
-	struct fdc_softc *fdc = (void *)parent;
-	struct fd_softc *fd = (void *)self;
+	struct fdc_softc *fdc = device_private(parent);
+	struct fd_softc *fd = device_private(self);
 	struct fdc_attach_args *fa = aux;
 	struct fd_type *type = fa->fa_deftype;
 	int drive = fa->fa_drive;
@@ -840,7 +840,7 @@
 }
 
 void
-fdcstatus(struct device *dv, int n, const char *s)
+fdcstatus(device_t dv, int n, const char *s)
 {
 	struct fdc_softc *fdc = (void *) device_parent(dv);
 
@@ -1028,7 +1028,8 @@
 		    fdc->sc_fr.fh_r12, (u_int)bp->b_data, fd->sc_skip);
 #endif
 		if (fiq_claim(&fdc->sc_fh) == -1)
-			panic("%s: Cannot claim FIQ vector", fdc->sc_dev.dv_xname);
+			panic("%s: Cannot claim FIQ vector",
+			    device_xname(&fdc->sc_dev));
 		IOMD_WRITE_BYTE(IOMD_FIQMSK, 0x01);
 		bus_space_write_2(iot, ioh, fdctl, type->rate);
 #ifdef FD_DEBUG

Index: src/sys/arch/acorn32/mainbus/lpt_pioc.c
diff -u src/sys/arch/acorn32/mainbus/lpt_pioc.c:1.10 src/sys/arch/acorn32/mainbus/lpt_pioc.c:1.11
--- src/sys/arch/acorn32/mainbus/lpt_pioc.c:1.10	Sun Apr 13 01:14:26 2008
+++ src/sys/arch/acorn32/mainbus/lpt_pioc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lpt_pioc.c,v 1.10 2008/04/13 01:14:26 chris Exp $	*/
+/*	$NetBSD: lpt_pioc.c,v 1.11 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe
@@ -36,7 +36,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: lpt_pioc.c,v 1.10 2008/04/13 01:14:26 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt_pioc.c,v 1.11 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -152,7 +152,7 @@
 }
 
 /*
- * int lpt_pioc_probe(struct device *parent, struct cfdata *cf, void *aux)
+ * int lpt_pioc_probe(device_t parent, cfdata_t cf, void *aux)
  *
  * Make sure we are trying to attach a lpt device and then
  * probe for one.
@@ -181,7 +181,7 @@
 }
 
 /*
- * void lpt_pioc_attach(struct device *parent, struct device *self, void *aux)
+ * void lpt_pioc_attach(device_t parent, device_t self, void *aux)
  *
  * attach the lpt device
  */

Index: src/sys/arch/acorn32/mainbus/pioc.c
diff -u src/sys/arch/acorn32/mainbus/pioc.c:1.15 src/sys/arch/acorn32/mainbus/pioc.c:1.16
--- src/sys/arch/acorn32/mainbus/pioc.c:1.15	Tue May 12 07:07:44 2009
+++ src/sys/arch/acorn32/mainbus/pioc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pioc.c,v 1.15 2009/05/12 07:07:44 cegger Exp $	*/     
+/*	$NetBSD: pioc.c,v 1.16 2011/06/03 07:35:37 matt Exp $	*/     
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -41,7 +41,7 @@
 /*#define PIOC_DEBUG*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pioc.c,v 1.15 2009/05/12 07:07:44 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pioc.c,v 1.16 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -91,13 +91,13 @@
 
 /* Prototypes for functions */
 
-static int  piocmatch(struct device *, struct cfdata *, void *);
-static void piocattach(struct device *, struct device *, void *);
+static int  piocmatch(device_t, cfdata_t, void *);
+static void piocattach(device_t, device_t, void *);
 static int  piocprint(void *aux, const char *name);
 #if 0
-static int  piocsearch(struct device *, struct cfdata *, void *);
+static int  piocsearch(device_t, cfdata_t, void *);
 #endif
-static int  piocsubmatch(struct device *, struct cfdata *,
+static int  piocsubmatch(device_t, cfdata_t,
 			      const int *, void *);
 static void piocgetid(bus_space_tag_t iot, bus_space_handle_t ioh,
 			      int config_entry, int *id, int *revision);
@@ -132,7 +132,7 @@
 }
 
 /*
- * int piocmatch(struct device *parent, struct cfdata *cf, void *aux)
+ * int piocmatch(device_t parent, cfdata_t cf, void *aux)
  *
  * Put the controller into config mode and probe the ID to see if
  * we recognise it.
@@ -141,7 +141,7 @@
  */ 
  
 static int
-piocmatch(struct device *parent, struct cfdata *cf, void *aux)
+piocmatch(device_t parent, cfdata_t cf, void *aux)
 {
 	struct mainbus_attach_args *mb = aux;
 	bus_space_tag_t iot;
@@ -203,7 +203,7 @@
 
 #if 0
 /*
- * int piocsearch(struct device *parent, struct cfdata *cf, void *aux)
+ * int piocsearch(device_t parent, cfdata_t cf, void *aux)
  *
  * search function used to probe and attach the child devices.
  *
@@ -212,9 +212,9 @@
  */
 
 static int
-piocsearch(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+piocsearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
-	struct pioc_softc *sc = (struct pioc_softc *)parent;
+	struct pioc_softc *sc = device_private(parent);
 	struct pioc_attach_args pa;
 	int tryagain;
 
@@ -245,7 +245,7 @@
 #endif
 
 /*
- * int piocsubmatch(struct device *parent, struct cfdata *cf, void *aux)
+ * int piocsubmatch(device_t parent, cfdata_t cf, void *aux)
  *
  * search function used to probe and attach the child devices.
  *
@@ -254,7 +254,7 @@
  */
 
 static int
-piocsubmatch(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+piocsubmatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
 	struct pioc_attach_args *pa = aux;
 	int tryagain;
@@ -277,17 +277,17 @@
 }
 
 /*
- * void piocattach(struct device *parent, struct device *dev, void *aux)
+ * void piocattach(device_t parent, device_t dev, void *aux)
  *
  * Identify the PIOC and read the config registers into the softc.
  * Search and configure all children
  */
   
 static void
-piocattach(struct device *parent, struct device *self, void *aux)
+piocattach(device_t parent, device_t self, void *aux)
 {
 	struct mainbus_attach_args *mb = aux;
-	struct pioc_softc *sc = (struct pioc_softc *)self;
+	struct pioc_softc *sc = device_private(self);
 	bus_space_tag_t iot;
 	bus_space_handle_t ioh;
 	int id, rev;

Index: src/sys/arch/acorn32/mainbus/wdc_pioc.c
diff -u src/sys/arch/acorn32/mainbus/wdc_pioc.c:1.23 src/sys/arch/acorn32/mainbus/wdc_pioc.c:1.24
--- src/sys/arch/acorn32/mainbus/wdc_pioc.c:1.23	Tue Mar 18 23:52:16 2008
+++ src/sys/arch/acorn32/mainbus/wdc_pioc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdc_pioc.c,v 1.23 2008/03/18 23:52:16 cube Exp $	*/
+/*	$NetBSD: wdc_pioc.c,v 1.24 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.23 2008/03/18 23:52:16 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.24 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -74,7 +74,7 @@
     wdc_pioc_probe, wdc_pioc_attach, NULL, NULL);
 
 /*
- * int wdc_pioc_probe(struct device *parent, struct cfdata *cf, void *aux)
+ * int wdc_pioc_probe(device_t parent, cfdata_t cf, void *aux)
  *
  * Make sure we are trying to attach a wdc device and then
  * probe for one.
@@ -137,7 +137,7 @@
 }
 
 /*
- * void wdc_pioc_attach(struct device *parent, struct device *self, void *aux)
+ * void wdc_pioc_attach(device_t parent, device_t self, void *aux)
  *
  * attach the wdc device
  */

Index: src/sys/arch/acorn32/podulebus/amps.c
diff -u src/sys/arch/acorn32/podulebus/amps.c:1.17 src/sys/arch/acorn32/podulebus/amps.c:1.18
--- src/sys/arch/acorn32/podulebus/amps.c:1.17	Fri Nov 27 03:23:03 2009
+++ src/sys/arch/acorn32/podulebus/amps.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: amps.c,v 1.17 2009/11/27 03:23:03 rmind Exp $	*/
+/*	$NetBSD: amps.c,v 1.18 2011/06/03 07:35:37 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amps.c,v 1.17 2009/11/27 03:23:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amps.c,v 1.18 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -85,8 +85,8 @@
 	bus_space_tag_t		sc_iot;			/* Bus tag */
 };
 
-int	amps_probe(struct device *, struct cfdata *, void *);
-void	amps_attach(struct device *, struct device *, void *);
+int	amps_probe(device_t, cfdata_t, void *);
+void	amps_attach(device_t, device_t, void *);
 
 CFATTACH_DECL(amps, sizeof(struct amps_softc),
     amps_probe, amps_attach, NULL, NULL);
@@ -130,9 +130,9 @@
  */
 
 int
-amps_probe(struct device *parent, struct cfdata *cf, void *aux)
+amps_probe(device_t parent, cfdata_t cf, void *aux)
 {
-	struct podule_attach_args *pa = (void *)aux;
+	struct podule_attach_args *pa = aux;
 
 	return (pa->pa_product == PODULE_ATOMWIDE_SERIAL);
 }
@@ -145,10 +145,10 @@
  */
 
 void
-amps_attach(struct device *parent, struct device *self, void *aux)
+amps_attach(device_t parent, device_t self, void *aux)
 {
-	struct amps_softc *sc = (void *)self;
-	struct podule_attach_args *pa = (void *)aux;
+	struct amps_softc *sc = device_private(self);
+	struct podule_attach_args *pa = aux;
 	struct amps_attach_args aa;
 
 	/* Note the podule number and validate */

Index: src/sys/arch/acorn32/podulebus/asc.c
diff -u src/sys/arch/acorn32/podulebus/asc.c:1.16 src/sys/arch/acorn32/podulebus/asc.c:1.17
--- src/sys/arch/acorn32/podulebus/asc.c:1.16	Tue May 12 06:54:10 2009
+++ src/sys/arch/acorn32/podulebus/asc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: asc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $	*/
+/*	$NetBSD: asc.c,v 1.17 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Richard Earnshaw
@@ -98,7 +98,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: asc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: asc.c,v 1.17 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -126,8 +126,8 @@
 #include <acorn32/podulebus/ascreg.h>
 #include <acorn32/podulebus/ascvar.h>
 
-void ascattach		(struct device *, struct device *, void *);
-int  ascmatch		(struct device *, struct cfdata *, void *);
+void ascattach		(device_t, device_t, void *);
+int  ascmatch		(device_t, cfdata_t, void *);
 
 void asc_enintr		(struct sbic_softc *);
 
@@ -160,7 +160,7 @@
 #endif
 
 int
-ascmatch(struct device *pdp, struct cfdata *cf, void *auxp)
+ascmatch(device_t pdp, cfdata_t cf, void *auxp)
 {
 	struct podule_attach_args *pa = (struct podule_attach_args *)auxp;
 
@@ -181,7 +181,7 @@
 }
 
 void
-ascattach(struct device *pdp, struct device *dp, void *auxp)
+ascattach(device_t pdp, device_t dp, void *auxp)
 {
 	/* volatile struct sdmac *rp;*/
 	struct asc_softc *sc;
Index: src/sys/arch/acorn32/podulebus/cosc.c
diff -u src/sys/arch/acorn32/podulebus/cosc.c:1.16 src/sys/arch/acorn32/podulebus/cosc.c:1.17
--- src/sys/arch/acorn32/podulebus/cosc.c:1.16	Tue May 12 06:54:10 2009
+++ src/sys/arch/acorn32/podulebus/cosc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cosc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $	*/
+/*	$NetBSD: cosc.c,v 1.17 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cosc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cosc.c,v 1.17 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -65,8 +65,8 @@
 #include <acorn32/podulebus/coscvar.h>
 #include <dev/podulebus/podules.h>
 
-void coscattach(struct device *, struct device *, void *);
-int coscmatch(struct device *, struct cfdata *, void *);
+void coscattach(device_t, device_t, void *);
+int coscmatch(device_t, cfdata_t, void *);
 
 CFATTACH_DECL(cosc, sizeof(struct cosc_softc),
     coscmatch, coscattach, NULL, NULL);
@@ -86,9 +86,9 @@
 #endif
 
 int
-coscmatch(struct device *pdp, struct cfdata *cf, void *auxp)
+coscmatch(device_t parent, cfdata_t cf, void *aux)
 {
-	struct podule_attach_args *pa = (struct podule_attach_args *)auxp;
+	struct podule_attach_args *pa = aux;
 
 	/* Look for the card */
 
@@ -106,15 +106,13 @@
 static int dummy[6];
 
 void
-coscattach(struct device *pdp, struct device *dp, void *auxp)
+coscattach(device_t parent, device_t self, void *aux)
 {
-	struct cosc_softc *sc = (struct cosc_softc *)dp;
-	struct podule_attach_args *pa;
+	struct cosc_softc *sc = device_private(self);
+	struct podule_attach_args *pa = aux;
 	cosc_regmap_p	   rp = &sc->sc_regmap;
 	vu_char		  *esc;
 
-	pa = (struct podule_attach_args *)auxp;
-
 	if (pa->pa_podule_number == -1)
 		panic("Podule has disappeared !");
 
@@ -236,7 +234,7 @@
 	sc->sc_softc.sc_bump_sz = PAGE_SIZE;
 	sc->sc_softc.sc_bump_pa = 0x0;
 
-	escinitialize((struct esc_softc *)sc);
+	escinitialize(&sc->sc_softc);
 
 	sc->sc_softc.sc_adapter.adapt_dev = &sc->sc_softc.sc_dev;
 	sc->sc_softc.sc_adapter.adapt_nchannels = 1;
@@ -271,18 +269,18 @@
 #endif
 	{
 		evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
-		    device_xname(dp), "intr");
+		    device_xname(self), "intr");
 		sc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_BIO,
 		    cosc_intr, sc, &sc->sc_intrcnt);
 		if (sc->sc_ih == NULL)
 			panic("%s: Cannot install IRQ handler",
-			    dp->dv_xname);
+			    device_xname(self));
 	}
 
 	printf("\n");
 
 	/* attach all scsi units on us */
-	config_found(dp, &sc->sc_softc.sc_channel, scsiprint);
+	config_found(self, &sc->sc_softc.sc_channel, scsiprint);
 }
 
 
Index: src/sys/arch/acorn32/podulebus/csc.c
diff -u src/sys/arch/acorn32/podulebus/csc.c:1.16 src/sys/arch/acorn32/podulebus/csc.c:1.17
--- src/sys/arch/acorn32/podulebus/csc.c:1.16	Tue May 12 06:54:10 2009
+++ src/sys/arch/acorn32/podulebus/csc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: csc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $	*/
+/*	$NetBSD: csc.c,v 1.17 2011/06/03 07:35:37 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: csc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: csc.c,v 1.17 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,8 +57,8 @@
 #include <dev/podulebus/podules.h>
 #include <dev/podulebus/powerromreg.h>
 
-int  cscmatch(struct device *, struct cfdata *, void *);
-void cscattach(struct device *, struct device *, void *);
+int  cscmatch(device_t, cfdata_t, void *);
+void cscattach(device_t, device_t, void *);
 
 CFATTACH_DECL(csc, sizeof(struct csc_softc),
     cscmatch, cscattach, NULL, NULL);
@@ -77,7 +77,7 @@
  * if we are a Cumana SCSI-2 card
  */
 int
-cscmatch(struct device *pdp, struct cfdata *cf, void *auxp)
+cscmatch(device_t pdp, cfdata_t cf, void *auxp)
 {
 	struct podule_attach_args *pa = (struct podule_attach_args *)auxp;
 
@@ -95,7 +95,7 @@
 }
 
 void
-cscattach(struct device *pdp, struct device *dp, void *auxp)
+cscattach(device_t pdp, device_t dp, void *auxp)
 {
 	struct csc_softc *sc = (struct csc_softc *)dp;
 	struct podule_attach_args  *pa;
Index: src/sys/arch/acorn32/podulebus/ptsc.c
diff -u src/sys/arch/acorn32/podulebus/ptsc.c:1.16 src/sys/arch/acorn32/podulebus/ptsc.c:1.17
--- src/sys/arch/acorn32/podulebus/ptsc.c:1.16	Tue May 12 06:54:10 2009
+++ src/sys/arch/acorn32/podulebus/ptsc.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptsc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $	*/
+/*	$NetBSD: ptsc.c,v 1.17 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptsc.c,v 1.16 2009/05/12 06:54:10 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptsc.c,v 1.17 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -98,8 +98,8 @@
 #include <dev/podulebus/podules.h>
 #include <dev/podulebus/powerromreg.h>
 
-int  ptscmatch(struct device *, struct cfdata *, void *);
-void ptscattach(struct device *, struct device *, void *);
+int  ptscmatch(device_t, cfdata_t, void *);
+void ptscattach(device_t, device_t, void *);
 
 CFATTACH_DECL(ptsc, sizeof(struct ptsc_softc),
     ptscmatch, ptscattach, NULL, NULL);
@@ -118,9 +118,9 @@
  * if we are a Power-tec SCSI-2 card
  */
 int
-ptscmatch(struct device *pdp, struct cfdata *cf, void *auxp)
+ptscmatch(device_t parent, cfdata_t cf, void *aux)
 {
-	struct podule_attach_args *pa = (struct podule_attach_args *)auxp;
+	struct podule_attach_args *pa = aux;
 
 	/* Look for the card */
 
@@ -138,15 +138,13 @@
 }
 
 void
-ptscattach(struct device *pdp, struct device *dp, void *auxp)
+ptscattach(device_t parent, device_t self, void *aux)
 {
-	struct ptsc_softc *sc = (struct ptsc_softc *)dp;
-	struct podule_attach_args  *pa;
+	struct ptsc_softc *sc = device_private(self);
+	struct podule_attach_args  *pa = aux;
 	ptsc_regmap_p	   rp = &sc->sc_regmap;
 	vu_char		  *fas;
 
-	pa = (struct podule_attach_args *)auxp;
-
 	if (pa->pa_podule_number == -1)
 		panic("Podule has disappeared !");
 
@@ -225,11 +223,11 @@
 
 #if PTSC_POLL == 0
 	evcnt_attach_dynamic(&sc->sc_softc.sc_intrcnt, EVCNT_TYPE_INTR, NULL,
-	    device_xname(dp), "intr");
+	    device_xname(self), "intr");
 	sc->sc_softc.sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_BIO,
 	    ptsc_intr, &sc->sc_softc, &sc->sc_softc.sc_intrcnt);
 	if (sc->sc_softc.sc_ih == NULL)
-	    panic("%s: Cannot install IRQ handler", dp->dv_xname);
+	    panic("%s: Cannot install IRQ handler", device_xname(self));
 #else
 	printf(" polling");
 	sc->sc_softc.sc_adapter.adapt_flags = SCSIPI_ADAPT_POLL_ONLY;
@@ -238,7 +236,7 @@
 	printf("\n");
 
 	/* attach all scsi units on us */
-	config_found(dp, &sc->sc_softc.sc_channel, scsiprint);
+	config_found(self, &sc->sc_softc.sc_channel, scsiprint);
 }
 
 

Index: src/sys/arch/acorn32/podulebus/if_ie.c
diff -u src/sys/arch/acorn32/podulebus/if_ie.c:1.29 src/sys/arch/acorn32/podulebus/if_ie.c:1.30
--- src/sys/arch/acorn32/podulebus/if_ie.c:1.29	Mon Apr  5 07:19:28 2010
+++ src/sys/arch/acorn32/podulebus/if_ie.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.29 2010/04/05 07:19:28 joerg Exp $ */
+/* $NetBSD: if_ie.c,v 1.30 2011/06/03 07:35:37 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.29 2010/04/05 07:19:28 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.30 2011/06/03 07:35:37 matt Exp $");
 
 #define IGNORE_ETHER1_IDROM_CHECKSUM
 
@@ -173,8 +173,8 @@
 			      struct ie_sys_ctl_block *pscb,
 			      void *pcmd, int ocmd, int scmd, int mask );
 
-int ieprobe(struct device *, struct cfdata *, void *);
-void ieattach(struct device *, struct device *, void *);
+int ieprobe(device_t, cfdata_t, void *);
+void ieattach(device_t, device_t, void *);
 
 static inline void ie_cli(struct ie_softc *);
 static inline void ieattn(struct ie_softc *);
@@ -292,9 +292,9 @@
  */
 
 int
-ieprobe(struct device *parent, struct cfdata *cf, void *aux)
+ieprobe(device_t parent, cfdata_t cf, void *aux)
 {
-	struct podule_attach_args *pa = (void *)aux;
+	struct podule_attach_args *pa = aux;
 
 /* Look for a network slot interface */
 
@@ -305,10 +305,10 @@
  * Attach our driver to the interfaces it uses
  */
   
-void ieattach ( struct device *parent, struct device *self, void *aux )
+void ieattach ( device_t parent, device_t self, void *aux )
 {
-	struct ie_softc *sc = (void *)self;
-	struct podule_attach_args *pa = (void *)aux;
+	struct ie_softc *sc = device_private(self);
+	struct podule_attach_args *pa = aux;
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
 	int i;
 	char idrom[32];

Index: src/sys/arch/acorn32/podulebus/netslot.c
diff -u src/sys/arch/acorn32/podulebus/netslot.c:1.8 src/sys/arch/acorn32/podulebus/netslot.c:1.9
--- src/sys/arch/acorn32/podulebus/netslot.c:1.8	Sat Mar 14 15:35:59 2009
+++ src/sys/arch/acorn32/podulebus/netslot.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netslot.c,v 1.8 2009/03/14 15:35:59 dsl Exp $	*/
+/*	$NetBSD: netslot.c,v 1.9 2011/06/03 07:35:37 matt Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -35,7 +35,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(1, "$NetBSD: netslot.c,v 1.8 2009/03/14 15:35:59 dsl Exp $");
+__KERNEL_RCSID(1, "$NetBSD: netslot.c,v 1.9 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -73,7 +73,7 @@
 }
 
 void
-netslotscan(struct device *dev)
+netslotscan(device_t dev)
 {
 	podule_t *podule;
 	volatile u_char *address;

Index: src/sys/arch/acorn32/podulebus/podulebus.c
diff -u src/sys/arch/acorn32/podulebus/podulebus.c:1.25 src/sys/arch/acorn32/podulebus/podulebus.c:1.26
--- src/sys/arch/acorn32/podulebus/podulebus.c:1.25	Tue May 12 06:54:10 2009
+++ src/sys/arch/acorn32/podulebus/podulebus.c	Fri Jun  3 07:35:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus.c,v 1.25 2009/05/12 06:54:10 cegger Exp $ */
+/* $NetBSD: podulebus.c,v 1.26 2011/06/03 07:35:37 matt Exp $ */
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -43,7 +43,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: podulebus.c,v 1.25 2009/05/12 06:54:10 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: podulebus.c,v 1.26 2011/06/03 07:35:37 matt Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -73,23 +73,22 @@
 /* Declare prototypes */
 
 u_int poduleread(u_int, int);
-int podulebusmatch(struct device *, struct cfdata *, void *);
-void podulebusattach(struct device *, struct device *, void *);
+int podulebusmatch(device_t, cfdata_t, void *);
+void podulebusattach(device_t, device_t, void *);
 int podulebusprint(void *, const char *);
-int podulebussubmatch(struct device *, struct cfdata *,
-		      const int *, void *);
+int podulebussubmatch(device_t, cfdata_t, const int *, void *);
 void podulechunkdirectory(podule_t *);
-void podulescan(struct device *);
+void podulescan(device_t);
 
 /*
- * int podulebusmatch(struct device *parent, void *match, void *aux)
+ * int podulebusmatch(device_t parent, void *match, void *aux)
  *
  * Probe for the podule bus. Currently all this does is return 1 to
  * indicate that the podule bus was found.
  */
  
 int
-podulebusmatch(struct device *parent, struct cfdata *cf, void *aux)
+podulebusmatch(device_t parent, cfdata_t cf, void *aux)
 {
 	switch (IOMD_ID) {
 	case RPC600_IOMD_ID:
@@ -123,7 +122,7 @@
 
 
 int
-podulebussubmatch(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+podulebussubmatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
 	struct podule_attach_args *pa = aux;
 
@@ -226,7 +225,7 @@
 
 
 void
-poduleexamine(podule_t *podule, struct device *dev, int slottype)
+poduleexamine(podule_t *podule, device_t dev, int slottype)
 {
 	struct manufacturer_description *man_desc;
 	struct podule_description *pod_desc;
@@ -300,7 +299,7 @@
 }
 
 void
-podulescan(struct device *dev)
+podulescan(device_t dev)
 {
 	int loop;
 	podule_t *podule;
@@ -391,7 +390,7 @@
 
 
 /*
- * void podulebusattach(struct device *parent, struct device *dev, void *aux)
+ * void podulebusattach(device_t parent, device_t dev, void *aux)
  *
  * Attach podulebus.
  * This probes all the podules and sets up the podules array with
@@ -401,7 +400,7 @@
  */
   
 void
-podulebusattach(struct device *parent, struct device *self, void *aux)
+podulebusattach(device_t parent, device_t self, void *aux)
 {
 	int loop;
 	struct podule_attach_args pa;
@@ -511,7 +510,7 @@
 }
 
 
-CFATTACH_DECL(podulebus, sizeof(struct device),
+CFATTACH_DECL_NEW(podulebus, 0,
 	podulebusmatch, podulebusattach, NULL, NULL);
 
 /* Useful functions that drivers may share */

Reply via email to