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>
16 static int __init
nvidia_hpet_check(struct acpi_table_header
*header
)
22 static int __init
check_bridge(int vendor
, int device
)
26 /* According to Nvidia all timer overrides are bogus unless HPET
28 if (!acpi_use_timer_override
&& vendor
== PCI_VENDOR_ID_NVIDIA
) {
29 if (!warned
&& acpi_table_parse(ACPI_SIG_HPET
,
32 acpi_skip_timer_override
= 1;
33 printk(KERN_INFO
"Nvidia board "
34 "detected. Ignoring ACPI "
36 printk(KERN_INFO
"If you got timer trouble "
37 "try acpi_use_timer_override\n");
42 if (vendor
== PCI_VENDOR_ID_ATI
&& timer_over_8254
== 1) {
44 printk(KERN_INFO
"ATI board detected. Disabling timer routing "
50 void __init
check_acpi_pci(void)
54 /* Assume the machine supports type 1. If not it will
55 always read ffffffff and should not have any side effect.
56 Actually a few buggy systems can machine check. Allow the user
57 to disable it by command line option at least -AK */
58 if (!early_pci_allowed())
61 /* Poor man's PCI discovery */
62 for (num
= 0; num
< 32; num
++) {
63 for (slot
= 0; slot
< 32; slot
++) {
64 for (func
= 0; func
< 8; func
++) {
67 class = read_pci_config(num
, slot
, func
,
69 if (class == 0xffffffff)
72 if ((class >> 16) != PCI_CLASS_BRIDGE_PCI
)
75 vendor
= read_pci_config(num
, slot
, func
,
78 if (check_bridge(vendor
& 0xffff, vendor
>> 16))