diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-11-23 13:33:15 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2004-11-23 13:33:15 +0000 |
commit | 97156b1518d549a42876807ae080ecf4817e7388 (patch) | |
tree | 7be5a8420660c7ab62907315cdb12bd76c1ee24a /sys/arch/i386 | |
parent | 3ecbd19bc3b00d71c40c04d62543e55cbef5df7e (diff) |
Use pci_matchbyid() for matching crazy VIA power management controllers
and add a few ones.
``valiay'' mickey@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/pci/pchb.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c index 42dede7fe47..3c48c32d40b 100644 --- a/sys/arch/i386/pci/pchb.c +++ b/sys/arch/i386/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.41 2003/11/07 16:43:08 mickey Exp $ */ +/* $OpenBSD: pchb.c,v 1.42 2004/11/23 13:33:14 grange Exp $ */ /* $NetBSD: pchb.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /* @@ -125,6 +125,13 @@ struct cfdriver pchb_cd = { void pchb_rnd(void *v); +const struct pci_matchid via_devices[] = { + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C586_PWR }, + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C596 }, + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C596B_PM }, + { PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C686A_SMB } +}; + int pchbmatch(parent, match, aux) struct device *parent; @@ -133,8 +140,8 @@ pchbmatch(parent, match, aux) struct pci_attach_args *pa = aux; /* XXX work around broken via82x866 chipsets */ - if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_VIATECH && - PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_VIATECH_VT82C686A_SMB) + if (pci_matchbyid(pa, via_devices, + sizeof(via_devices) / sizeof(via_devices[0]))) return (0); if (PCI_CLASS(pa->pa_class) == PCI_CLASS_BRIDGE && |