diff options
Diffstat (limited to 'arch/x86/kernel/early-quirks.c')
| -rw-r--r-- | arch/x86/kernel/early-quirks.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 4353cf5e6fac..733c4f8d42ea 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
| @@ -95,6 +95,66 @@ static void __init nvidia_bugs(int num, int slot, int func) | |||
| 95 | 95 | ||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | static u32 ati_ixp4x0_rev(int num, int slot, int func) | ||
| 99 | { | ||
| 100 | u32 d; | ||
| 101 | u8 b; | ||
| 102 | |||
| 103 | b = read_pci_config_byte(num, slot, func, 0xac); | ||
| 104 | b &= ~(1<<5); | ||
| 105 | write_pci_config_byte(num, slot, func, 0xac, b); | ||
| 106 | |||
| 107 | d = read_pci_config(num, slot, func, 0x70); | ||
| 108 | d |= 1<<8; | ||
| 109 | write_pci_config(num, slot, func, 0x70, d); | ||
| 110 | |||
| 111 | d = read_pci_config(num, slot, func, 0x8); | ||
| 112 | d &= 0xff; | ||
| 113 | return d; | ||
| 114 | } | ||
| 115 | |||
| 116 | static void __init ati_bugs(int num, int slot, int func) | ||
| 117 | { | ||
| 118 | #if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC) | ||
| 119 | u32 d; | ||
| 120 | u8 b; | ||
| 121 | |||
| 122 | if (acpi_use_timer_override) | ||
| 123 | return; | ||
| 124 | |||
| 125 | d = ati_ixp4x0_rev(num, slot, func); | ||
| 126 | if (d < 0x82) | ||
| 127 | acpi_skip_timer_override = 1; | ||
| 128 | else { | ||
| 129 | /* check for IRQ0 interrupt swap */ | ||
| 130 | outb(0x72, 0xcd6); b = inb(0xcd7); | ||
| 131 | if (!(b & 0x2)) | ||
| 132 | acpi_skip_timer_override = 1; | ||
| 133 | } | ||
| 134 | |||
| 135 | if (acpi_skip_timer_override) { | ||
| 136 | printk(KERN_INFO "SB4X0 revision 0x%x\n", d); | ||
| 137 | printk(KERN_INFO "Ignoring ACPI timer override.\n"); | ||
| 138 | printk(KERN_INFO "If you got timer trouble " | ||
| 139 | "try acpi_use_timer_override\n"); | ||
| 140 | } | ||
| 141 | #endif | ||
| 142 | } | ||
| 143 | |||
| 144 | #ifdef CONFIG_DMAR | ||
| 145 | static void __init intel_g33_dmar(int num, int slot, int func) | ||
| 146 | { | ||
| 147 | struct acpi_table_header *dmar_tbl; | ||
| 148 | acpi_status status; | ||
| 149 | |||
| 150 | status = acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_tbl); | ||
| 151 | if (ACPI_SUCCESS(status)) { | ||
| 152 | printk(KERN_INFO "BIOS BUG: DMAR advertised on Intel G31/G33 chipset -- ignoring\n"); | ||
| 153 | dmar_disabled = 1; | ||
| 154 | } | ||
| 155 | } | ||
| 156 | #endif | ||
| 157 | |||
| 98 | #define QFLAG_APPLY_ONCE 0x1 | 158 | #define QFLAG_APPLY_ONCE 0x1 |
| 99 | #define QFLAG_APPLIED 0x2 | 159 | #define QFLAG_APPLIED 0x2 |
| 100 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) | 160 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) |
| @@ -114,6 +174,12 @@ static struct chipset early_qrk[] __initdata = { | |||
| 114 | PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs }, | 174 | PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs }, |
| 115 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB, | 175 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB, |
| 116 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, | 176 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, |
| 177 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, | ||
| 178 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | ||
| 179 | #ifdef CONFIG_DMAR | ||
| 180 | { PCI_VENDOR_ID_INTEL, 0x29c0, | ||
| 181 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, | ||
| 182 | #endif | ||
| 117 | {} | 183 | {} |
| 118 | }; | 184 | }; |
| 119 | 185 | ||
