summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-04-04 16:03:18 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-04-04 16:03:18 +0000
commitb30ee5a2da7a030c9914a582347ea60ec5a4b52c (patch)
tree869171502bc887d84235370007050addfed6aa0b /sys/arch/amd64/pci
parent206fe41965076a184fe029dc61bf83d642cb895d (diff)
Remove an unused function inherited from NetBSD that deals with a broken
SiS chipset that we'll never see on and amd64 machine. ok oga@
Diffstat (limited to 'sys/arch/amd64/pci')
-rw-r--r--sys/arch/amd64/pci/pci_machdep.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c
index 679e4b3fcda..96b62150d83 100644
--- a/sys/arch/amd64/pci/pci_machdep.c
+++ b/sys/arch/amd64/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.23 2009/04/04 15:08:05 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.24 2009/04/04 16:03:17 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -549,48 +549,3 @@ pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie)
{
intr_disestablish(cookie);
}
-
-/*
- * Determine which flags should be passed to the primary PCI bus's
- * autoconfiguration node. We use this to detect broken chipsets
- * which cannot safely use memory-mapped device access.
- */
-int
-pci_bus_flags(void)
-{
- int rval = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
- int device, maxndevs;
- pcitag_t tag;
- pcireg_t id;
-
- maxndevs = pci_bus_maxdevs(NULL, 0);
-
- for (device = 0; device < maxndevs; device++) {
- tag = pci_make_tag(NULL, 0, device, 0);
- id = pci_conf_read(NULL, tag, PCI_ID_REG);
-
- /* Invalid vendor ID value? */
- if (PCI_VENDOR(id) == PCI_VENDOR_INVALID)
- continue;
- /* XXX Not invalid, but we've done this ~forever. */
- if (PCI_VENDOR(id) == 0)
- continue;
-
- switch (PCI_VENDOR(id)) {
- case PCI_VENDOR_SIS:
- switch (PCI_PRODUCT(id)) {
- case PCI_PRODUCT_SIS_85C496:
- goto disable_mem;
- }
- break;
- }
- }
-
- return (rval);
-
- disable_mem:
- printf("Warning: broken PCI-Host bridge detected; "
- "disabling memory-mapped access\n");
- rval &= ~(PCI_FLAGS_MEM_ENABLED);
- return (rval);
-}