Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/pci actually split device and softc



details:   https://anonhg.NetBSD.org/src/rev/cceb426f80cc
branches:  trunk
changeset: 770629:cceb426f80cc
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Oct 26 04:56:23 2011 +0000

description:
actually split device and softc

diffstat:

 sys/arch/macppc/pci/bandit.c   |  9 +++++----
 sys/arch/macppc/pci/grackle.c  |  9 +++++----
 sys/arch/macppc/pci/uninorth.c |  9 +++++----
 3 files changed, 15 insertions(+), 12 deletions(-)

diffs (132 lines):

diff -r 58270f6277bc -r cceb426f80cc sys/arch/macppc/pci/bandit.c
--- a/sys/arch/macppc/pci/bandit.c      Wed Oct 26 01:46:11 2011 +0000
+++ b/sys/arch/macppc/pci/bandit.c      Wed Oct 26 04:56:23 2011 +0000
@@ -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 @@
 #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_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 @@
        } ranges[6], *rp = ranges;
 
        aprint_normal("\n");
+       sc->sc_dev = self;
 
        /* Bandit address */
        if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8)
diff -r 58270f6277bc -r cceb426f80cc sys/arch/macppc/pci/grackle.c
--- a/sys/arch/macppc/pci/grackle.c     Wed Oct 26 01:46:11 2011 +0000
+++ b/sys/arch/macppc/pci/grackle.c     Wed Oct 26 04:56:23 2011 +0000
@@ -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 @@
 #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 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 @@
        } ranges[6], *rp = ranges;
 
        aprint_normal("\n");
+       sc->sc_dev = self;
 
        /* PCI bus number */
        if (OF_getprop(node, "bus-range", busrange, sizeof(busrange)) != 8)
diff -r 58270f6277bc -r cceb426f80cc sys/arch/macppc/pci/uninorth.c
--- a/sys/arch/macppc/pci/uninorth.c    Wed Oct 26 01:46:11 2011 +0000
+++ b/sys/arch/macppc/pci/uninorth.c    Wed Oct 26 04:56:23 2011 +0000
@@ -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 @@
 #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 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 @@
        } ranges[6], *rp = ranges;
 
        printf("\n");
+       sc->sc_dev = self;
 
        /* UniNorth address */
        if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8)



Home | Main Index | Thread Index | Old Index