Module Name: src Committed By: matt Date: Mon Dec 13 16:19:03 UTC 2010
Modified Files: src/sys/arch/ibmnws/include: pci_machdep.h src/sys/arch/ibmnws/pci: pci_machdep.c src/sys/arch/powerpc/include: pci_machdep.h src/sys/arch/powerpc/marvell: pci_machdep.c src/sys/arch/powerpc/pci: pci_machdep_common.c src/sys/arch/prep/include: pci_machdep.h src/sys/arch/prep/pci: pci_machdep.c Log Message: 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.] To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ibmnws/include/pci_machdep.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ibmnws/pci/pci_machdep.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/pci_machdep.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/marvell/pci_machdep.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/pci/pci_machdep_common.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/prep/include/pci_machdep.h cvs rdiff -u -r1.32 -r1.33 src/sys/arch/prep/pci/pci_machdep.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/ibmnws/include/pci_machdep.h diff -u src/sys/arch/ibmnws/include/pci_machdep.h:1.6 src/sys/arch/ibmnws/include/pci_machdep.h:1.7 --- src/sys/arch/ibmnws/include/pci_machdep.h:1.6 Sat Jun 14 12:01:28 2008 +++ src/sys/arch/ibmnws/include/pci_machdep.h Mon Dec 13 16:19:03 2010 @@ -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); Index: src/sys/arch/ibmnws/pci/pci_machdep.c diff -u src/sys/arch/ibmnws/pci/pci_machdep.c:1.5 src/sys/arch/ibmnws/pci/pci_machdep.c:1.6 --- src/sys/arch/ibmnws/pci/pci_machdep.c:1.5 Sat Jun 14 12:05:39 2008 +++ src/sys/arch/ibmnws/pci/pci_machdep.c Mon Dec 13 16:19:03 2010 @@ -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) { /* Index: src/sys/arch/powerpc/include/pci_machdep.h diff -u src/sys/arch/powerpc/include/pci_machdep.h:1.8 src/sys/arch/powerpc/include/pci_machdep.h:1.9 --- src/sys/arch/powerpc/include/pci_machdep.h:1.8 Mon Apr 28 20:23:32 2008 +++ src/sys/arch/powerpc/include/pci_machdep.h Mon Dec 13 16:19:02 2010 @@ -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); Index: src/sys/arch/powerpc/marvell/pci_machdep.c diff -u src/sys/arch/powerpc/marvell/pci_machdep.c:1.1 src/sys/arch/powerpc/marvell/pci_machdep.c:1.2 --- src/sys/arch/powerpc/marvell/pci_machdep.c:1.1 Wed Apr 28 13:51:55 2010 +++ src/sys/arch/powerpc/marvell/pci_machdep.c Mon Dec 13 16:19:02 2010 @@ -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, Index: src/sys/arch/powerpc/pci/pci_machdep_common.c diff -u src/sys/arch/powerpc/pci/pci_machdep_common.c:1.8 src/sys/arch/powerpc/pci/pci_machdep_common.c:1.9 --- src/sys/arch/powerpc/pci/pci_machdep_common.c:1.8 Mon Apr 28 20:23:32 2008 +++ src/sys/arch/powerpc/pci/pci_machdep_common.c Mon Dec 13 16:19:03 2010 @@ -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; } Index: src/sys/arch/prep/include/pci_machdep.h diff -u src/sys/arch/prep/include/pci_machdep.h:1.15 src/sys/arch/prep/include/pci_machdep.h:1.16 --- src/sys/arch/prep/include/pci_machdep.h:1.15 Mon Apr 28 20:23:33 2008 +++ src/sys/arch/prep/include/pci_machdep.h Mon Dec 13 16:19:02 2010 @@ -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); Index: src/sys/arch/prep/pci/pci_machdep.c diff -u src/sys/arch/prep/pci/pci_machdep.c:1.32 src/sys/arch/prep/pci/pci_machdep.c:1.33 --- src/sys/arch/prep/pci/pci_machdep.c:1.32 Wed Oct 17 19:56:51 2007 +++ src/sys/arch/prep/pci/pci_machdep.c Mon Dec 13 16:19:02 2010 @@ -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;