Mon May 4 12:15:51 2009 UTC ()
struct device * -> device_t, use device_private()
No functional changes intended.


(cegger)
diff -r1.4 -r1.5 src/sys/arch/i386/pci/gcscehci.c
diff -r1.14 -r1.15 src/sys/arch/i386/pci/p64h2apic.c

cvs diff -r1.4 -r1.5 src/sys/arch/i386/pci/gcscehci.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/gcscehci.c 2008/07/06 08:01:15 1.4
+++ src/sys/arch/i386/pci/gcscehci.c 2009/05/04 12:15:51 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: gcscehci.c,v 1.4 2008/07/06 08:01:15 cegger Exp $ */ 1/* $NetBSD: gcscehci.c,v 1.5 2009/05/04 12:15:51 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002, 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2001, 2002, 2007 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) 8 * by Lennart Augustsson (lennart@augustsson.net)
9 * and Jared D. McNeill (jmcneill@invisible.ca) 9 * and Jared D. McNeill (jmcneill@invisible.ca)
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.4 2008/07/06 08:01:15 cegger Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: gcscehci.c,v 1.5 2009/05/04 12:15:51 cegger Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/proc.h> 40#include <sys/proc.h>
41#include <sys/queue.h> 41#include <sys/queue.h>
42 42
43#include <machine/bus.h> 43#include <machine/bus.h>
44#include <machine/cpufunc.h> 44#include <machine/cpufunc.h>
45 45
46#include <dev/pci/pcidevs.h> 46#include <dev/pci/pcidevs.h>
47#include <dev/pci/pcivar.h> 47#include <dev/pci/pcivar.h>
@@ -63,42 +63,42 @@ extern int ehcidebug; @@ -63,42 +63,42 @@ extern int ehcidebug;
63#endif 63#endif
64 64
65#define GCSCUSB_MSR_BASE 0x51200000 65#define GCSCUSB_MSR_BASE 0x51200000
66#define GCSCUSB_MSR_EHCB (GCSCUSB_MSR_BASE + 0x09) 66#define GCSCUSB_MSR_EHCB (GCSCUSB_MSR_BASE + 0x09)
67 67
68struct gcscehci_softc { 68struct gcscehci_softc {
69 ehci_softc_t sc; 69 ehci_softc_t sc;
70 pci_chipset_tag_t sc_pc; 70 pci_chipset_tag_t sc_pc;
71 pcitag_t sc_tag; 71 pcitag_t sc_tag;
72 void *sc_ih; /* interrupt vectoring */ 72 void *sc_ih; /* interrupt vectoring */
73}; 73};
74 74
75static int 75static int
76gcscehci_match(struct device *parent, struct cfdata *match, void *aux) 76gcscehci_match(device_t parent, cfdata_t match, void *aux)
77{ 77{
78 struct pci_attach_args *pa = (struct pci_attach_args *) aux; 78 struct pci_attach_args *pa = (struct pci_attach_args *) aux;
79 79
80 if (PCI_CLASS(pa->pa_class) == PCI_CLASS_SERIALBUS && 80 if (PCI_CLASS(pa->pa_class) == PCI_CLASS_SERIALBUS &&
81 PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_SERIALBUS_USB && 81 PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_SERIALBUS_USB &&
82 PCI_INTERFACE(pa->pa_class) == PCI_INTERFACE_EHCI && 82 PCI_INTERFACE(pa->pa_class) == PCI_INTERFACE_EHCI &&
83 PCI_VENDOR(pa->pa_id) == PCI_VENDOR_AMD && 83 PCI_VENDOR(pa->pa_id) == PCI_VENDOR_AMD &&
84 PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_CS5536_EHCI) 84 PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_CS5536_EHCI)
85 return (10); /* beat ehci_pci */ 85 return (10); /* beat ehci_pci */
86 86
87 return (0); 87 return (0);
88} 88}
89 89
90static void 90static void
91gcscehci_attach(struct device *parent, struct device *self, void *aux) 91gcscehci_attach(device_t parent, device_t self, void *aux)
92{ 92{
93 struct gcscehci_softc *sc = device_private(self); 93 struct gcscehci_softc *sc = device_private(self);
94 struct pci_attach_args *pa = (struct pci_attach_args *)aux; 94 struct pci_attach_args *pa = (struct pci_attach_args *)aux;
95 pci_chipset_tag_t pc = pa->pa_pc; 95 pci_chipset_tag_t pc = pa->pa_pc;
96 pcitag_t tag = pa->pa_tag; 96 pcitag_t tag = pa->pa_tag;
97 char const *intrstr; 97 char const *intrstr;
98 pci_intr_handle_t ih; 98 pci_intr_handle_t ih;
99 const char *vendor; 99 const char *vendor;
100 const char *devname = device_xname(self); 100 const char *devname = device_xname(self);
101 char devinfo[256]; 101 char devinfo[256];
102 usbd_status r; 102 usbd_status r;
103 bus_addr_t ehcibase; 103 bus_addr_t ehcibase;
104 int ncomp; 104 int ncomp;

cvs diff -r1.14 -r1.15 src/sys/arch/i386/pci/p64h2apic.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/p64h2apic.c 2008/07/09 20:45:33 1.14
+++ src/sys/arch/i386/pci/p64h2apic.c 2009/05/04 12:15:51 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: p64h2apic.c,v 1.14 2008/07/09 20:45:33 joerg Exp $ */ 1/* $NetBSD: p64h2apic.c,v 1.15 2009/05/04 12:15:51 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Bill Sommerfeld. 8 * by Bill Sommerfeld.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -28,39 +28,39 @@ @@ -28,39 +28,39 @@
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Driver for P64H2 IOxAPIC 33 * Driver for P64H2 IOxAPIC
34 * 34 *
35 * This is an ioapic which appears in PCI space. 35 * This is an ioapic which appears in PCI space.
36 * This driver currently does nothing useful but will eventually 36 * This driver currently does nothing useful but will eventually
37 * thwak the ioapic into working correctly. 37 * thwak the ioapic into working correctly.
38 */ 38 */
39 39
40#include <sys/cdefs.h> 40#include <sys/cdefs.h>
41__KERNEL_RCSID(0, "$NetBSD: p64h2apic.c,v 1.14 2008/07/09 20:45:33 joerg Exp $"); 41__KERNEL_RCSID(0, "$NetBSD: p64h2apic.c,v 1.15 2009/05/04 12:15:51 cegger Exp $");
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/kernel.h> 45#include <sys/kernel.h>
46#include <sys/device.h> 46#include <sys/device.h>
47 47
48#include <dev/pci/pcireg.h> 48#include <dev/pci/pcireg.h>
49#include <dev/pci/pcivar.h> 49#include <dev/pci/pcivar.h>
50#include <dev/pci/pcidevs.h> 50#include <dev/pci/pcidevs.h>
51 51
52static int p64h2match(struct device *, struct cfdata *, void *); 52static int p64h2match(device_t, cfdata_t, void *);
53static void p64h2attach(struct device *, struct device *, void *); 53static void p64h2attach(device_t, device_t, void *);
54 54
55struct p64h2apic_softc { 55struct p64h2apic_softc {
56 pcitag_t sc_tag; 56 pcitag_t sc_tag;
57}; 57};
58 58
59CFATTACH_DECL_NEW(p64h2apic, sizeof(struct p64h2apic_softc), 59CFATTACH_DECL_NEW(p64h2apic, sizeof(struct p64h2apic_softc),
60 p64h2match, p64h2attach, NULL, NULL); 60 p64h2match, p64h2attach, NULL, NULL);
61 61
62static int 62static int
63p64h2match(device_t parent, cfdata_t match, void *aux) 63p64h2match(device_t parent, cfdata_t match, void *aux)
64{ 64{
65 struct pci_attach_args *pa = aux; 65 struct pci_attach_args *pa = aux;
66 66