2 * Do early PCI probing for bug detection when the main PCI subsystem is
5 #include <linux/init.h>
6 #include <linux/kernel.h>
8 #include <asm/pci-direct.h>
12 static int __init check_bridge(int vendor, int device)
15 /* According to Nvidia all timer overrides are bogus. Just ignore
17 if (vendor == PCI_VENDOR_ID_NVIDIA) {
18 acpi_skip_timer_override = 1;
21 if (vendor == PCI_VENDOR_ID_ATI && timer_over_8254 == 1) {
23 printk(KERN_INFO "ATI board detected. Disabling timer routing "
29 void __init check_acpi_pci(void)
33 /* Assume the machine supports type 1. If not it will
34 always read ffffffff and should not have any side effect. */
36 /* Poor man's PCI discovery */
37 for (num = 0; num < 32; num++) {
38 for (slot = 0; slot < 32; slot++) {
39 for (func = 0; func < 8; func++) {
42 class = read_pci_config(num, slot, func,
44 if (class == 0xffffffff)
47 if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
50 vendor = read_pci_config(num, slot, func,
53 if (check_bridge(vendor & 0xffff, vendor >> 16))