Module Name:    src
Committed By:   macallan
Date:           Wed Oct 26 04:56:23 UTC 2011

Modified Files:
        src/sys/arch/macppc/pci: bandit.c grackle.c uninorth.c

Log Message:
actually split device and softc


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/macppc/pci/bandit.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/macppc/pci/grackle.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/macppc/pci/uninorth.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/macppc/pci/bandit.c
diff -u src/sys/arch/macppc/pci/bandit.c:1.29 src/sys/arch/macppc/pci/bandit.c:1.30
--- src/sys/arch/macppc/pci/bandit.c:1.29	Thu Jun 30 00:52:58 2011
+++ src/sys/arch/macppc/pci/bandit.c	Wed Oct 26 04:56:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bandit.c,v 1.29 2011/06/30 00:52:58 matt Exp $	*/
+/*	$NetBSD: bandit.c,v 1.30 2011/10/26 04:56:23 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.29 2011/06/30 00:52:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.30 2011/10/26 04:56:23 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1
 #include <machine/pio.h>
 
 struct bandit_softc {
-	struct device sc_dev;
+	device_t sc_dev;
 	struct genppc_pci_chipset sc_pc;
 	struct powerpc_bus_space sc_iot;
 	struct powerpc_bus_space sc_memt;
@@ -56,7 +56,7 @@ static void bandit_conf_write(void *, pc
 
 static void bandit_init(struct bandit_softc *);
 
-CFATTACH_DECL(bandit, sizeof(struct bandit_softc),
+CFATTACH_DECL_NEW(bandit, sizeof(struct bandit_softc),
     bandit_match, bandit_attach, NULL, NULL);
 
 static int
@@ -87,6 +87,7 @@ bandit_attach(device_t parent, device_t 
 	} ranges[6], *rp = ranges;
 
 	aprint_normal("\n");
+	sc->sc_dev = self;
 
 	/* Bandit address */
 	if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8)

Index: src/sys/arch/macppc/pci/grackle.c
diff -u src/sys/arch/macppc/pci/grackle.c:1.14 src/sys/arch/macppc/pci/grackle.c:1.15
--- src/sys/arch/macppc/pci/grackle.c:1.14	Thu Jun 30 00:52:58 2011
+++ src/sys/arch/macppc/pci/grackle.c	Wed Oct 26 04:56:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: grackle.c,v 1.14 2011/06/30 00:52:58 matt Exp $	*/
+/*	$NetBSD: grackle.c,v 1.15 2011/10/26 04:56:23 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grackle.c,v 1.14 2011/06/30 00:52:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grackle.c,v 1.15 2011/10/26 04:56:23 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: grackle.c,v 
 #include <machine/pio.h>
 
 struct grackle_softc {
-	struct device sc_dev;
+	device_t sc_dev;
 	struct genppc_pci_chipset sc_pc;
 	struct powerpc_bus_space sc_iot;
 	struct powerpc_bus_space sc_memt;
@@ -53,7 +53,7 @@ static int grackle_match(device_t, cfdat
 static pcireg_t grackle_conf_read(void *, pcitag_t, int);
 static void grackle_conf_write(void *, pcitag_t, int, pcireg_t);
 
-CFATTACH_DECL(grackle, sizeof(struct grackle_softc),
+CFATTACH_DECL_NEW(grackle, sizeof(struct grackle_softc),
     grackle_match, grackle_attach, NULL, NULL);
 
 static int
@@ -92,6 +92,7 @@ grackle_attach(device_t parent, device_t
 	} ranges[6], *rp = ranges;
 
 	aprint_normal("\n");
+	sc->sc_dev = self;
 
 	/* PCI bus number */
 	if (OF_getprop(node, "bus-range", busrange, sizeof(busrange)) != 8)

Index: src/sys/arch/macppc/pci/uninorth.c
diff -u src/sys/arch/macppc/pci/uninorth.c:1.15 src/sys/arch/macppc/pci/uninorth.c:1.16
--- src/sys/arch/macppc/pci/uninorth.c:1.15	Thu Jun 30 00:52:58 2011
+++ src/sys/arch/macppc/pci/uninorth.c	Wed Oct 26 04:56:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uninorth.c,v 1.15 2011/06/30 00:52:58 matt Exp $	*/
+/*	$NetBSD: uninorth.c,v 1.16 2011/10/26 04:56:23 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uninorth.c,v 1.15 2011/06/30 00:52:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uninorth.c,v 1.16 2011/10/26 04:56:23 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -41,7 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: uninorth.c,v
 #include <machine/pio.h>
 
 struct uninorth_softc {
-	struct device sc_dev;
+	device_t sc_dev;
 	struct genppc_pci_chipset sc_pc;
 	struct powerpc_bus_space sc_iot;
 	struct powerpc_bus_space sc_memt;
@@ -53,7 +53,7 @@ static int uninorth_match(device_t, cfda
 static pcireg_t uninorth_conf_read(void *, pcitag_t, int);
 static void uninorth_conf_write(void *, pcitag_t, int, pcireg_t);
 
-CFATTACH_DECL(uninorth, sizeof(struct uninorth_softc),
+CFATTACH_DECL_NEW(uninorth, sizeof(struct uninorth_softc),
     uninorth_match, uninorth_attach, NULL, NULL);
 
 static int
@@ -89,6 +89,7 @@ uninorth_attach(device_t parent, device_
 	} ranges[6], *rp = ranges;
 
 	printf("\n");
+	sc->sc_dev = self;
 
 	/* UniNorth address */
 	if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8)

Reply via email to