Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Change definition of pc_bus_maxdevs to get a void *...



details:   https://anonhg.NetBSD.org/src/rev/d2e699b51883
branches:  trunk
changeset: 759596:d2e699b51883
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Dec 13 16:19:02 2010 +0000

description:
Change definition of pc_bus_maxdevs to get a void * instead a pci_chipset_tag_t
to match its use in pci_bus_maxdevs.  This makes it the same as pci_conf_read
and pci_conf_write.
Change all struct device * to device_t.
[Obviously nothing ever used the first argument to pc_bus_maxdevs since it
could have never worked because it wasn't being passed a pci_chipset_tag_t.]

diffstat:

 sys/arch/ibmnws/include/pci_machdep.h     |   4 ++--
 sys/arch/ibmnws/pci/pci_machdep.c         |   4 ++--
 sys/arch/powerpc/include/pci_machdep.h    |  14 +++++++-------
 sys/arch/powerpc/marvell/pci_machdep.c    |   8 ++++----
 sys/arch/powerpc/pci/pci_machdep_common.c |   6 +++---
 sys/arch/prep/include/pci_machdep.h       |   4 ++--
 sys/arch/prep/pci/pci_machdep.c           |   6 +++---
 7 files changed, 23 insertions(+), 23 deletions(-)

diffs (193 lines):

diff -r 0ded95ed158e -r d2e699b51883 sys/arch/ibmnws/include/pci_machdep.h
--- a/sys/arch/ibmnws/include/pci_machdep.h     Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/ibmnws/include/pci_machdep.h     Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.6 2008/06/14 12:01:28 mjf Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.7 2010/12/13 16:19:03 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * ibmnws-specific PCI functions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
  */
-int ibmnws_pci_bus_maxdevs(pci_chipset_tag_t, int);
+int ibmnws_pci_bus_maxdevs(void *, int);
 int ibmnws_pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
 int ibmnws_pci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t);
 
diff -r 0ded95ed158e -r d2e699b51883 sys/arch/ibmnws/pci/pci_machdep.c
--- a/sys/arch/ibmnws/pci/pci_machdep.c Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/ibmnws/pci/pci_machdep.c Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.5 2008/06/14 12:05:39 mjf Exp $      */
+/*     $NetBSD: pci_machdep.c,v 1.6 2010/12/13 16:19:03 matt Exp $     */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -92,7 +92,7 @@
 }
 
 int
-ibmnws_pci_bus_maxdevs(pci_chipset_tag_t pct, int busno)
+ibmnws_pci_bus_maxdevs(void *v, int busno)
 {
 
        /*
diff -r 0ded95ed158e -r d2e699b51883 sys/arch/powerpc/include/pci_machdep.h
--- a/sys/arch/powerpc/include/pci_machdep.h    Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/powerpc/include/pci_machdep.h    Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.8 2008/04/28 20:23:32 martin Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.9 2010/12/13 16:19:02 matt Exp $ */
 
 /*-
  * Copyright (c) 2002,2007 The NetBSD Foundation, Inc.
@@ -66,9 +66,9 @@
  */
 struct genppc_pci_chipset {
        void            *pc_conf_v;
-       void            (*pc_attach_hook)(struct device *,
-                           struct device *, struct pcibus_attach_args *);
-       int             (*pc_bus_maxdevs)(pci_chipset_tag_t, int);
+       void            (*pc_attach_hook)(device_t, device_t,
+                           struct pcibus_attach_args *);
+       int             (*pc_bus_maxdevs)(void *, int);
        pcitag_t        (*pc_make_tag)(void *, int, int, int);
        pcireg_t        (*pc_conf_read)(void *, pcitag_t, int);
        void            (*pc_conf_write)(void *, pcitag_t, int, pcireg_t);
@@ -135,7 +135,7 @@
  * Generic PowerPC PCI functions.  Override if necc.
  */
 
-int genppc_pci_bus_maxdevs(pci_chipset_tag_t, int);
+int genppc_pci_bus_maxdevs(void *, int);
 const char *genppc_pci_intr_string(void *, pci_intr_handle_t);
 const struct evcnt *genppc_pci_intr_evcnt(void *, pci_intr_handle_t);
 void *genppc_pci_intr_establish(void *, pci_intr_handle_t, int, int (*)(void *),
@@ -146,7 +146,7 @@
 int genppc_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp);
 
 /* generic indirect PCI functions */
-void genppc_pci_indirect_attach_hook(struct device *, struct device *,
+void genppc_pci_indirect_attach_hook(device_t, device_t,
     struct pcibus_attach_args *);
 pcitag_t genppc_pci_indirect_make_tag(void *, int, int, int);
 pcireg_t genppc_pci_indirect_conf_read(void *, pcitag_t, int);
@@ -154,7 +154,7 @@
 void genppc_pci_indirect_decompose_tag(void *, pcitag_t, int *, int *, int *);
 
 /* generic OFW method PCI functions */
-void genppc_pci_ofmethod_attach_hook(struct device *, struct device *,
+void genppc_pci_ofmethod_attach_hook(device_t, device_t,
     struct pcibus_attach_args *);
 pcitag_t genppc_pci_ofmethod_make_tag(void *, int, int, int);
 pcireg_t genppc_pci_ofmethod_conf_read(void *, pcitag_t, int);
diff -r 0ded95ed158e -r d2e699b51883 sys/arch/powerpc/marvell/pci_machdep.c
--- a/sys/arch/powerpc/marvell/pci_machdep.c    Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/powerpc/marvell/pci_machdep.c    Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.1 2010/04/28 13:51:55 kiyohara Exp $ */
+/*     $NetBSD: pci_machdep.c,v 1.2 2010/12/13 16:19:02 matt Exp $     */
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.1 2010/04/28 13:51:55 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.2 2010/12/13 16:19:02 matt Exp $");
 
 #include "gtpci.h"
 #include "pci.h"
@@ -56,7 +56,7 @@
 struct genppc_pci_chipset genppc_gtpci0_chipset = {
        NULL,                           /* pc_conf_v */
        gtpci_attach_hook,
-       (int (*)(pci_chipset_tag_t, int))gtpci_bus_maxdevs,
+       gtpci_bus_maxdevs,
        gtpci_make_tag,
        gtpci_conf_read,
        gtpci_conf_write,
@@ -75,7 +75,7 @@
 struct genppc_pci_chipset genppc_gtpci1_chipset = {
        NULL,                           /* pc_conf_v */
        gtpci_attach_hook,
-       (int (*)(pci_chipset_tag_t, int))gtpci_bus_maxdevs,
+       gtpci_bus_maxdevs,
        gtpci_make_tag,
        gtpci_conf_read,
        gtpci_conf_write,
diff -r 0ded95ed158e -r d2e699b51883 sys/arch/powerpc/pci/pci_machdep_common.c
--- a/sys/arch/powerpc/pci/pci_machdep_common.c Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/powerpc/pci/pci_machdep_common.c Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep_common.c,v 1.8 2008/04/28 20:23:32 martin Exp $ */
+/* $NetBSD: pci_machdep_common.c,v 1.9 2010/12/13 16:19:03 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep_common.c,v 1.8 2008/04/28 20:23:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep_common.c,v 1.9 2010/12/13 16:19:03 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -82,7 +82,7 @@
 };
 
 int
-genppc_pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
+genppc_pci_bus_maxdevs(void *v, int busno)
 {
        return 32;
 }
diff -r 0ded95ed158e -r d2e699b51883 sys/arch/prep/include/pci_machdep.h
--- a/sys/arch/prep/include/pci_machdep.h       Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/prep/include/pci_machdep.h       Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.15 2008/04/28 20:23:33 martin Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.16 2010/12/13 16:19:02 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * prep-specific PCI functions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
  */
-int prep_pci_bus_maxdevs(pci_chipset_tag_t, int);
+int prep_pci_bus_maxdevs(void *, int);
 int prep_pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
 int prep_pci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t);
 
diff -r 0ded95ed158e -r d2e699b51883 sys/arch/prep/pci/pci_machdep.c
--- a/sys/arch/prep/pci/pci_machdep.c   Mon Dec 13 14:26:22 2010 +0000
+++ b/sys/arch/prep/pci/pci_machdep.c   Mon Dec 13 16:19:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.32 2007/10/17 19:56:51 garbled Exp $ */
+/*     $NetBSD: pci_machdep.c,v 1.33 2010/12/13 16:19:02 matt Exp $    */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.32 2007/10/17 19:56:51 garbled Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.33 2010/12/13 16:19:02 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -121,7 +121,7 @@
 }
 
 int
-prep_pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
+prep_pci_bus_maxdevs(void *v, int busno)
 {
        struct genppc_pci_chipset_businfo *pbi;
        prop_object_t busmax;



Home | Main Index | Thread Index | Old Index