Mon Jun 6 14:33:32 2011 UTC ()
Rename to use PCI_PRODUCT_INTEL_82801DBM_LPC


(msaitoh)
diff -r1.47 -r1.48 src/sys/arch/i386/pci/pci_intr_fixup.c
diff -r1.29 -r1.30 src/sys/arch/x86/pci/ichlpcib.c

cvs diff -r1.47 -r1.48 src/sys/arch/i386/pci/pci_intr_fixup.c (expand / switch to unified diff)

--- src/sys/arch/i386/pci/pci_intr_fixup.c 2008/04/28 20:23:25 1.47
+++ src/sys/arch/i386/pci/pci_intr_fixup.c 2011/06/06 14:33:31 1.48
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pci_intr_fixup.c,v 1.47 2008/04/28 20:23:25 martin Exp $ */ 1/* $NetBSD: pci_intr_fixup.c,v 1.48 2011/06/06 14:33:31 msaitoh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center. 9 * NASA Ames Research Center.
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
@@ -50,27 +50,27 @@ @@ -50,27 +50,27 @@
50 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS  50 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)  51 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT  52 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY  53 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  54 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 * SUCH DAMAGE.  55 * SUCH DAMAGE.
56 */ 56 */
57 57
58/* 58/*
59 * PCI Interrupt Router support. 59 * PCI Interrupt Router support.
60 */ 60 */
61 61
62#include <sys/cdefs.h> 62#include <sys/cdefs.h>
63__KERNEL_RCSID(0, "$NetBSD: pci_intr_fixup.c,v 1.47 2008/04/28 20:23:25 martin Exp $"); 63__KERNEL_RCSID(0, "$NetBSD: pci_intr_fixup.c,v 1.48 2011/06/06 14:33:31 msaitoh Exp $");
64 64
65#include "opt_pcibios.h" 65#include "opt_pcibios.h"
66#include "opt_pcifixup.h" 66#include "opt_pcifixup.h"
67 67
68#include <sys/param.h> 68#include <sys/param.h>
69#include <sys/systm.h> 69#include <sys/systm.h>
70#include <sys/kernel.h> 70#include <sys/kernel.h>
71#include <sys/malloc.h> 71#include <sys/malloc.h>
72#include <sys/queue.h> 72#include <sys/queue.h>
73#include <sys/device.h> 73#include <sys/device.h>
74 74
75#include <machine/bus.h> 75#include <machine/bus.h>
76#include <machine/intr.h> 76#include <machine/intr.h>
@@ -138,27 +138,27 @@ const struct pciintr_icu_table { @@ -138,27 +138,27 @@ const struct pciintr_icu_table {
138 piix_init, piix_uninit }, /* ICH */ 138 piix_init, piix_uninit }, /* ICH */
139 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AB_LPC, 139 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AB_LPC,
140 piix_init, piix_uninit }, /* ICH0 */ 140 piix_init, piix_uninit }, /* ICH0 */
141 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BA_LPC, 141 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BA_LPC,
142 ich_init, NULL }, /* ICH2 */ 142 ich_init, NULL }, /* ICH2 */
143 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BAM_LPC, 143 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BAM_LPC,
144 ich_init, NULL }, /* ICH2M */ 144 ich_init, NULL }, /* ICH2M */
145 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CA_LPC, 145 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CA_LPC,
146 ich_init, NULL }, /* ICH3S */ 146 ich_init, NULL }, /* ICH3S */
147 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CAM_LPC, 147 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CAM_LPC,
148 ich_init, NULL }, /* ICH3M */ 148 ich_init, NULL }, /* ICH3M */
149 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DB_LPC, 149 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DB_LPC,
150 ich_init, NULL }, /* ICH4 */ 150 ich_init, NULL }, /* ICH4 */
151 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DB_ISA, 151 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DBM_LPC,
152 ich_init, NULL }, /* ICH4M */ 152 ich_init, NULL }, /* ICH4M */
153 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801EB_LPC, 153 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801EB_LPC,
154 ich_init, NULL }, /* ICH5 */ 154 ich_init, NULL }, /* ICH5 */
155 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FB_LPC, 155 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FB_LPC,
156 ich_init, NULL }, /* ICH6/ICH6R */ 156 ich_init, NULL }, /* ICH6/ICH6R */
157 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FBM_LPC, 157 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FBM_LPC,
158 ich_init, NULL }, /* ICH6M */ 158 ich_init, NULL }, /* ICH6M */
159 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801G_LPC, 159 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801G_LPC,
160 ich_init, NULL }, /* ICH7/ICH7R */ 160 ich_init, NULL }, /* ICH7/ICH7R */
161 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GBM_LPC, 161 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GBM_LPC,
162 ich_init, NULL }, /* ICH7-M */ 162 ich_init, NULL }, /* ICH7-M */
163 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GHM_LPC, 163 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GHM_LPC,
164 ich_init, NULL }, /* ICH7DH/ICH7-M DH */ 164 ich_init, NULL }, /* ICH7DH/ICH7-M DH */

cvs diff -r1.29 -r1.30 src/sys/arch/x86/pci/ichlpcib.c (expand / switch to unified diff)

--- src/sys/arch/x86/pci/ichlpcib.c 2011/04/04 20:37:55 1.29
+++ src/sys/arch/x86/pci/ichlpcib.c 2011/06/06 14:33:31 1.30
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ichlpcib.c,v 1.29 2011/04/04 20:37:55 dyoung Exp $ */ 1/* $NetBSD: ichlpcib.c,v 1.30 2011/06/06 14:33:31 msaitoh Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 2004 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 Minoura Makoto and Matthew R. Green. 8 * by Minoura Makoto and Matthew R. Green.
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.
@@ -29,27 +29,27 @@ @@ -29,27 +29,27 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Intel I/O Controller Hub (ICHn) LPC Interface Bridge driver 33 * Intel I/O Controller Hub (ICHn) LPC Interface Bridge driver
34 * 34 *
35 * LPC Interface Bridge is basically a pcib (PCI-ISA Bridge), but has 35 * LPC Interface Bridge is basically a pcib (PCI-ISA Bridge), but has
36 * some power management and monitoring functions. 36 * some power management and monitoring functions.
37 * Currently we support the watchdog timer, SpeedStep (on some systems) 37 * Currently we support the watchdog timer, SpeedStep (on some systems)
38 * and the power management timer. 38 * and the power management timer.
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.29 2011/04/04 20:37:55 dyoung Exp $"); 42__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.30 2011/06/06 14:33:31 msaitoh Exp $");
43 43
44#include <sys/types.h> 44#include <sys/types.h>
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47#include <sys/device.h> 47#include <sys/device.h>
48#include <sys/sysctl.h> 48#include <sys/sysctl.h>
49#include <sys/timetc.h> 49#include <sys/timetc.h>
50#include <sys/gpio.h> 50#include <sys/gpio.h>
51#include <machine/bus.h> 51#include <machine/bus.h>
52 52
53#include <dev/pci/pcivar.h> 53#include <dev/pci/pcivar.h>
54#include <dev/pci/pcireg.h> 54#include <dev/pci/pcireg.h>
55#include <dev/pci/pcidevs.h> 55#include <dev/pci/pcidevs.h>
@@ -173,27 +173,27 @@ CFATTACH_DECL2_NEW(ichlpcib, sizeof(stru @@ -173,27 +173,27 @@ CFATTACH_DECL2_NEW(ichlpcib, sizeof(stru
173 173
174static struct lpcib_device { 174static struct lpcib_device {
175 pcireg_t vendor, product; 175 pcireg_t vendor, product;
176 int has_rcba; 176 int has_rcba;
177 int has_ich5_hpet; 177 int has_ich5_hpet;
178} lpcib_devices[] = { 178} lpcib_devices[] = {
179 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AA_LPC, 0, 0 }, 179 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AA_LPC, 0, 0 },
180 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AB_LPC, 0, 0 }, 180 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801AB_LPC, 0, 0 },
181 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BA_LPC, 0, 0 }, 181 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BA_LPC, 0, 0 },
182 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BAM_LPC, 0, 0 }, 182 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801BAM_LPC, 0, 0 },
183 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CA_LPC, 0, 0 }, 183 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CA_LPC, 0, 0 },
184 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CAM_LPC, 0, 0 }, 184 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801CAM_LPC, 0, 0 },
185 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DB_LPC, 0, 0 }, 185 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DB_LPC, 0, 0 },
186 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DB_ISA, 0, 0 }, 186 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801DBM_LPC, 0, 0 },
187 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801EB_LPC, 0, 1 }, 187 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801EB_LPC, 0, 1 },
188 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FB_LPC, 1, 0 }, 188 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FB_LPC, 1, 0 },
189 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FBM_LPC, 1, 0 }, 189 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801FBM_LPC, 1, 0 },
190 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801G_LPC, 1, 0 }, 190 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801G_LPC, 1, 0 },
191 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GBM_LPC, 1, 0 }, 191 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GBM_LPC, 1, 0 },
192 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GHM_LPC, 1, 0 }, 192 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801GHM_LPC, 1, 0 },
193 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801H_LPC, 1, 0 }, 193 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801H_LPC, 1, 0 },
194 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HEM_LPC, 1, 0 }, 194 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HEM_LPC, 1, 0 },
195 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HH_LPC, 1, 0 }, 195 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HH_LPC, 1, 0 },
196 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HO_LPC, 1, 0 }, 196 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HO_LPC, 1, 0 },
197 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HBM_LPC, 1, 0 }, 197 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801HBM_LPC, 1, 0 },
198 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801IH_LPC, 1, 0 }, 198 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801IH_LPC, 1, 0 },
199 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801IO_LPC, 1, 0 }, 199 { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801IO_LPC, 1, 0 },
@@ -795,27 +795,27 @@ speedstep_bad_hb_check(const struct pci_ @@ -795,27 +795,27 @@ speedstep_bad_hb_check(const struct pci_
795 return 1; 795 return 1;
796 796
797 return 0; 797 return 0;
798} 798}
799 799
800static void 800static void
801speedstep_configure(device_t self) 801speedstep_configure(device_t self)
802{ 802{
803 struct lpcib_softc *sc = device_private(self); 803 struct lpcib_softc *sc = device_private(self);
804 const struct sysctlnode *node, *ssnode; 804 const struct sysctlnode *node, *ssnode;
805 int rv; 805 int rv;
806 806
807 /* Supported on ICH2-M, ICH3-M and ICH4-M. */ 807 /* Supported on ICH2-M, ICH3-M and ICH4-M. */
808 if (PCI_PRODUCT(sc->sc_pa.pa_id) == PCI_PRODUCT_INTEL_82801DB_ISA || 808 if (PCI_PRODUCT(sc->sc_pa.pa_id) == PCI_PRODUCT_INTEL_82801DBM_LPC ||
809 PCI_PRODUCT(sc->sc_pa.pa_id) == PCI_PRODUCT_INTEL_82801CAM_LPC || 809 PCI_PRODUCT(sc->sc_pa.pa_id) == PCI_PRODUCT_INTEL_82801CAM_LPC ||
810 (PCI_PRODUCT(sc->sc_pa.pa_id) == PCI_PRODUCT_INTEL_82801BAM_LPC && 810 (PCI_PRODUCT(sc->sc_pa.pa_id) == PCI_PRODUCT_INTEL_82801BAM_LPC &&
811 pci_find_device(&sc->sc_pa, speedstep_bad_hb_check) == 0)) { 811 pci_find_device(&sc->sc_pa, speedstep_bad_hb_check) == 0)) {
812 pcireg_t pmcon; 812 pcireg_t pmcon;
813 813
814 /* Enable SpeedStep if it isn't already enabled. */ 814 /* Enable SpeedStep if it isn't already enabled. */
815 pmcon = pci_conf_read(sc->sc_pcib.sc_pc, sc->sc_pcib.sc_tag, 815 pmcon = pci_conf_read(sc->sc_pcib.sc_pc, sc->sc_pcib.sc_tag,
816 LPCIB_PCI_GEN_PMCON_1); 816 LPCIB_PCI_GEN_PMCON_1);
817 if ((pmcon & LPCIB_PCI_GEN_PMCON_1_SS_EN) == 0) 817 if ((pmcon & LPCIB_PCI_GEN_PMCON_1_SS_EN) == 0)
818 pci_conf_write(sc->sc_pcib.sc_pc, sc->sc_pcib.sc_tag, 818 pci_conf_write(sc->sc_pcib.sc_pc, sc->sc_pcib.sc_tag,
819 LPCIB_PCI_GEN_PMCON_1, 819 LPCIB_PCI_GEN_PMCON_1,
820 pmcon | LPCIB_PCI_GEN_PMCON_1_SS_EN); 820 pmcon | LPCIB_PCI_GEN_PMCON_1_SS_EN);
821 821