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 <linux/acpi.h>
10 #include <asm/pci-direct.h>
17 static int __init
nvidia_hpet_check(struct acpi_table_header
*header
)
23 static int __init
check_bridge(int vendor
, int device
)
27 /* According to Nvidia all timer overrides are bogus unless HPET
29 if (!acpi_use_timer_override
&& vendor
== PCI_VENDOR_ID_NVIDIA
) {
30 if (!warned
&& acpi_table_parse(ACPI_SIG_HPET
,
33 acpi_skip_timer_override
= 1;
34 printk(KERN_INFO
"Nvidia board "
35 "detected. Ignoring ACPI "
37 printk(KERN_INFO
"If you got timer trouble "
38 "try acpi_use_timer_override\n");
43 if (vendor
== PCI_VENDOR_ID_ATI
&& timer_over_8254
== 1) {
45 printk(KERN_INFO
"ATI board detected. Disabling timer routing "
51 static void check_intel(void)
55 vendor
= read_pci_config_16(0, 0, 0, PCI_VENDOR_ID
);
57 if (vendor
!= PCI_VENDOR_ID_INTEL
)
60 device
= read_pci_config_16(0, 0, 0, PCI_DEVICE_ID
);
62 if (device
== PCI_DEVICE_ID_INTEL_E7320_MCH
||
63 device
== PCI_DEVICE_ID_INTEL_E7520_MCH
||
64 device
== PCI_DEVICE_ID_INTEL_E7525_MCH
)
65 quirk_intel_irqbalance();
69 void __init
check_acpi_pci(void)
73 /* Assume the machine supports type 1. If not it will
74 always read ffffffff and should not have any side effect.
75 Actually a few buggy systems can machine check. Allow the user
76 to disable it by command line option at least -AK */
77 if (!early_pci_allowed())
82 /* Poor man's PCI discovery */
83 for (num
= 0; num
< 32; num
++) {
84 for (slot
= 0; slot
< 32; slot
++) {
85 for (func
= 0; func
< 8; func
++) {
88 class = read_pci_config(num
, slot
, func
,
90 if (class == 0xffffffff)
93 if ((class >> 16) != PCI_CLASS_BRIDGE_PCI
)
96 vendor
= read_pci_config(num
, slot
, func
,
99 if (check_bridge(vendor
& 0xffff, vendor
>> 16))