12 #include <linux/pci.h>
19 #include <asm/iommu.h>
22 static void __init fix_hypertransport_config(
int num,
int slot,
int func)
32 if (htcfg & (1 << 18)) {
34 "on hypertransport bus\n");
35 if ((htcfg & (1 << 17)) == 0) {
37 "apic interrupt broadcast\n");
39 "please contact your hw vendor\n");
48 static void __init via_bugs(
int num,
int slot,
int func)
50 #ifdef CONFIG_GART_IOMMU
54 "Looks like a VIA chipset. Disabling IOMMU."
55 " Override with iommu=allowed\n");
62 #ifdef CONFIG_X86_IO_APIC
71 static void __init nvidia_bugs(
int num,
int slot,
int func)
74 #ifdef CONFIG_X86_IO_APIC
82 if (acpi_use_timer_override)
86 acpi_skip_timer_override = 1;
88 "detected. Ignoring ACPI "
91 "try acpi_use_timer_override\n");
99 #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
100 static u32 __init ati_ixp4x0_rev(
int num,
int slot,
int func)
118 static void __init ati_bugs(
int num,
int slot,
int func)
123 if (acpi_use_timer_override)
126 d = ati_ixp4x0_rev(num, slot, func);
128 acpi_skip_timer_override = 1;
131 outb(0x72, 0xcd6); b =
inb(0xcd7);
133 acpi_skip_timer_override = 1;
136 if (acpi_skip_timer_override) {
140 "try acpi_use_timer_override\n");
144 static u32 __init ati_sbx00_rev(
int num,
int slot,
int func)
154 static void __init ati_bugs_contd(
int num,
int slot,
int func)
158 rev = ati_sbx00_rev(num, slot, func);
160 acpi_fix_pin2_polarity = 1;
170 if (acpi_use_timer_override)
176 acpi_skip_timer_override = 1;
178 if (acpi_skip_timer_override) {
182 "try acpi_use_timer_override\n");
186 static void __init ati_bugs(
int num,
int slot,
int func)
190 static void __init ati_bugs_contd(
int num,
int slot,
int func)
195 #define QFLAG_APPLY_ONCE 0x1
196 #define QFLAG_APPLIED 0x2
197 #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
238 static int __init check_dev_quirk(
int num,
int slot,
int func)
255 for (i = 0; early_qrk[
i].f !=
NULL; i++) {
257 (early_qrk[i].vendor == vendor)) &&
259 (early_qrk[i].device == device)) &&
260 (!((early_qrk[i].
class ^
class) &
261 early_qrk[i].class_mask))) {
262 if ((early_qrk[i].
flags &
264 early_qrk[
i].f(num, slot, func);
286 for (slot = 0; slot < 32; slot++)
287 for (func = 0; func < 8; func++) {
289 if (check_dev_quirk(0, slot, func))