diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-15 07:45:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-15 07:45:59 -0400 |
commit | 91d0322bef047e2916b3e52741411bffc63929cb (patch) | |
tree | 44c4fd13cc17755a6db8a3d70cffb86e57a838dc /arch/x86/kernel/quirks.c | |
parent | 065cb3dfe24978651caedfa54da585388ad15dde (diff) | |
parent | 50515af207d410c9f228380e529c56f43c3de0bd (diff) |
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'arch/x86/kernel/quirks.c')
-rw-r--r-- | arch/x86/kernel/quirks.c | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index d89a648fe710..79bdcd11c66e 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -65,6 +65,7 @@ static enum { | |||
65 | ICH_FORCE_HPET_RESUME, | 65 | ICH_FORCE_HPET_RESUME, |
66 | VT8237_FORCE_HPET_RESUME, | 66 | VT8237_FORCE_HPET_RESUME, |
67 | NVIDIA_FORCE_HPET_RESUME, | 67 | NVIDIA_FORCE_HPET_RESUME, |
68 | ATI_FORCE_HPET_RESUME, | ||
68 | } force_hpet_resume_type; | 69 | } force_hpet_resume_type; |
69 | 70 | ||
70 | static void __iomem *rcba_base; | 71 | static void __iomem *rcba_base; |
@@ -158,6 +159,8 @@ static void ich_force_enable_hpet(struct pci_dev *dev) | |||
158 | 159 | ||
159 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, | 160 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, |
160 | ich_force_enable_hpet); | 161 | ich_force_enable_hpet); |
162 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, | ||
163 | ich_force_enable_hpet); | ||
161 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, | 164 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, |
162 | ich_force_enable_hpet); | 165 | ich_force_enable_hpet); |
163 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, | 166 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, |
@@ -174,6 +177,12 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_7, | |||
174 | 177 | ||
175 | static struct pci_dev *cached_dev; | 178 | static struct pci_dev *cached_dev; |
176 | 179 | ||
180 | static void hpet_print_force_info(void) | ||
181 | { | ||
182 | printk(KERN_INFO "HPET not enabled in BIOS. " | ||
183 | "You might try hpet=force boot option\n"); | ||
184 | } | ||
185 | |||
177 | static void old_ich_force_hpet_resume(void) | 186 | static void old_ich_force_hpet_resume(void) |
178 | { | 187 | { |
179 | u32 val; | 188 | u32 val; |
@@ -253,6 +262,8 @@ static void old_ich_force_enable_hpet_user(struct pci_dev *dev) | |||
253 | { | 262 | { |
254 | if (hpet_force_user) | 263 | if (hpet_force_user) |
255 | old_ich_force_enable_hpet(dev); | 264 | old_ich_force_enable_hpet(dev); |
265 | else | ||
266 | hpet_print_force_info(); | ||
256 | } | 267 | } |
257 | 268 | ||
258 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, | 269 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, |
@@ -290,8 +301,13 @@ static void vt8237_force_enable_hpet(struct pci_dev *dev) | |||
290 | { | 301 | { |
291 | u32 uninitialized_var(val); | 302 | u32 uninitialized_var(val); |
292 | 303 | ||
293 | if (!hpet_force_user || hpet_address || force_hpet_address) | 304 | if (hpet_address || force_hpet_address) |
305 | return; | ||
306 | |||
307 | if (!hpet_force_user) { | ||
308 | hpet_print_force_info(); | ||
294 | return; | 309 | return; |
310 | } | ||
295 | 311 | ||
296 | pci_read_config_dword(dev, 0x68, &val); | 312 | pci_read_config_dword(dev, 0x68, &val); |
297 | /* | 313 | /* |
@@ -330,6 +346,36 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, | |||
330 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | 346 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, |
331 | vt8237_force_enable_hpet); | 347 | vt8237_force_enable_hpet); |
332 | 348 | ||
349 | static void ati_force_hpet_resume(void) | ||
350 | { | ||
351 | pci_write_config_dword(cached_dev, 0x14, 0xfed00000); | ||
352 | printk(KERN_DEBUG "Force enabled HPET at resume\n"); | ||
353 | } | ||
354 | |||
355 | static void ati_force_enable_hpet(struct pci_dev *dev) | ||
356 | { | ||
357 | u32 uninitialized_var(val); | ||
358 | |||
359 | if (hpet_address || force_hpet_address) | ||
360 | return; | ||
361 | |||
362 | if (!hpet_force_user) { | ||
363 | hpet_print_force_info(); | ||
364 | return; | ||
365 | } | ||
366 | |||
367 | pci_write_config_dword(dev, 0x14, 0xfed00000); | ||
368 | pci_read_config_dword(dev, 0x14, &val); | ||
369 | force_hpet_address = val; | ||
370 | force_hpet_resume_type = ATI_FORCE_HPET_RESUME; | ||
371 | dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at 0x%lx\n", | ||
372 | force_hpet_address); | ||
373 | cached_dev = dev; | ||
374 | return; | ||
375 | } | ||
376 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, | ||
377 | ati_force_enable_hpet); | ||
378 | |||
333 | /* | 379 | /* |
334 | * Undocumented chipset feature taken from LinuxBIOS. | 380 | * Undocumented chipset feature taken from LinuxBIOS. |
335 | */ | 381 | */ |
@@ -343,8 +389,13 @@ static void nvidia_force_enable_hpet(struct pci_dev *dev) | |||
343 | { | 389 | { |
344 | u32 uninitialized_var(val); | 390 | u32 uninitialized_var(val); |
345 | 391 | ||
346 | if (!hpet_force_user || hpet_address || force_hpet_address) | 392 | if (hpet_address || force_hpet_address) |
393 | return; | ||
394 | |||
395 | if (!hpet_force_user) { | ||
396 | hpet_print_force_info(); | ||
347 | return; | 397 | return; |
398 | } | ||
348 | 399 | ||
349 | pci_write_config_dword(dev, 0x44, 0xfed00001); | 400 | pci_write_config_dword(dev, 0x44, 0xfed00001); |
350 | pci_read_config_dword(dev, 0x44, &val); | 401 | pci_read_config_dword(dev, 0x44, &val); |
@@ -397,6 +448,9 @@ void force_hpet_resume(void) | |||
397 | case NVIDIA_FORCE_HPET_RESUME: | 448 | case NVIDIA_FORCE_HPET_RESUME: |
398 | nvidia_force_hpet_resume(); | 449 | nvidia_force_hpet_resume(); |
399 | return; | 450 | return; |
451 | case ATI_FORCE_HPET_RESUME: | ||
452 | ati_force_hpet_resume(); | ||
453 | return; | ||
400 | default: | 454 | default: |
401 | break; | 455 | break; |
402 | } | 456 | } |