diff options
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 733c4f8d42ea..3ce029ffaa55 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -95,7 +95,8 @@ 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) | 98 | #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC) |
99 | static u32 __init ati_ixp4x0_rev(int num, int slot, int func) | ||
99 | { | 100 | { |
100 | u32 d; | 101 | u32 d; |
101 | u8 b; | 102 | u8 b; |
@@ -115,7 +116,6 @@ static u32 ati_ixp4x0_rev(int num, int slot, int func) | |||
115 | 116 | ||
116 | static void __init ati_bugs(int num, int slot, int func) | 117 | static void __init ati_bugs(int num, int slot, int func) |
117 | { | 118 | { |
118 | #if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC) | ||
119 | u32 d; | 119 | u32 d; |
120 | u8 b; | 120 | u8 b; |
121 | 121 | ||
@@ -138,9 +138,56 @@ static void __init ati_bugs(int num, int slot, int func) | |||
138 | printk(KERN_INFO "If you got timer trouble " | 138 | printk(KERN_INFO "If you got timer trouble " |
139 | "try acpi_use_timer_override\n"); | 139 | "try acpi_use_timer_override\n"); |
140 | } | 140 | } |
141 | #endif | ||
142 | } | 141 | } |
143 | 142 | ||
143 | static u32 __init ati_sbx00_rev(int num, int slot, int func) | ||
144 | { | ||
145 | u32 old, d; | ||
146 | |||
147 | d = read_pci_config(num, slot, func, 0x70); | ||
148 | old = d; | ||
149 | d &= ~(1<<8); | ||
150 | write_pci_config(num, slot, func, 0x70, d); | ||
151 | d = read_pci_config(num, slot, func, 0x8); | ||
152 | d &= 0xff; | ||
153 | write_pci_config(num, slot, func, 0x70, old); | ||
154 | |||
155 | return d; | ||
156 | } | ||
157 | |||
158 | static void __init ati_bugs_contd(int num, int slot, int func) | ||
159 | { | ||
160 | u32 d, rev; | ||
161 | |||
162 | if (acpi_use_timer_override) | ||
163 | return; | ||
164 | |||
165 | rev = ati_sbx00_rev(num, slot, func); | ||
166 | if (rev > 0x13) | ||
167 | return; | ||
168 | |||
169 | /* check for IRQ0 interrupt swap */ | ||
170 | d = read_pci_config(num, slot, func, 0x64); | ||
171 | if (!(d & (1<<14))) | ||
172 | acpi_skip_timer_override = 1; | ||
173 | |||
174 | if (acpi_skip_timer_override) { | ||
175 | printk(KERN_INFO "SB600 revision 0x%x\n", rev); | ||
176 | printk(KERN_INFO "Ignoring ACPI timer override.\n"); | ||
177 | printk(KERN_INFO "If you got timer trouble " | ||
178 | "try acpi_use_timer_override\n"); | ||
179 | } | ||
180 | } | ||
181 | #else | ||
182 | static void __init ati_bugs(int num, int slot, int func) | ||
183 | { | ||
184 | } | ||
185 | |||
186 | static void __init ati_bugs_contd(int num, int slot, int func) | ||
187 | { | ||
188 | } | ||
189 | #endif | ||
190 | |||
144 | #ifdef CONFIG_DMAR | 191 | #ifdef CONFIG_DMAR |
145 | static void __init intel_g33_dmar(int num, int slot, int func) | 192 | static void __init intel_g33_dmar(int num, int slot, int func) |
146 | { | 193 | { |
@@ -176,6 +223,8 @@ static struct chipset early_qrk[] __initdata = { | |||
176 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, | 223 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, |
177 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, | 224 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, |
178 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | 225 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, |
226 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | ||
227 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | ||
179 | #ifdef CONFIG_DMAR | 228 | #ifdef CONFIG_DMAR |
180 | { PCI_VENDOR_ID_INTEL, 0x29c0, | 229 | { PCI_VENDOR_ID_INTEL, 0x29c0, |
181 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, | 230 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, |