aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/quirks.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index a4ce1911efdf..5317c40efd13 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -60,7 +60,8 @@ static enum {
60 NONE_FORCE_HPET_RESUME, 60 NONE_FORCE_HPET_RESUME,
61 OLD_ICH_FORCE_HPET_RESUME, 61 OLD_ICH_FORCE_HPET_RESUME,
62 ICH_FORCE_HPET_RESUME, 62 ICH_FORCE_HPET_RESUME,
63 VT8237_FORCE_HPET_RESUME 63 VT8237_FORCE_HPET_RESUME,
64 NVIDIA_FORCE_HPET_RESUME,
64} force_hpet_resume_type; 65} force_hpet_resume_type;
65 66
66static void __iomem *rcba_base; 67static void __iomem *rcba_base;
@@ -321,6 +322,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235,
321DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, 322DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
322 vt8237_force_enable_hpet); 323 vt8237_force_enable_hpet);
323 324
325/*
326 * Undocumented chipset feature taken from LinuxBIOS.
327 */
328static void nvidia_force_hpet_resume(void)
329{
330 pci_write_config_dword(cached_dev, 0x44, 0xfed00001);
331 printk(KERN_DEBUG "Force enabled HPET at resume\n");
332}
333
334static void nvidia_force_enable_hpet(struct pci_dev *dev)
335{
336 u32 uninitialized_var(val);
337
338 if (!hpet_force_user || hpet_address || force_hpet_address)
339 return;
340
341 pci_write_config_dword(dev, 0x44, 0xfed00001);
342 pci_read_config_dword(dev, 0x44, &val);
343 force_hpet_address = val & 0xfffffffe;
344 force_hpet_resume_type = NVIDIA_FORCE_HPET_RESUME;
345 printk(KERN_DEBUG "Force enabled HPET at base address 0x%lx\n",
346 force_hpet_address);
347 cached_dev = dev;
348 return;
349}
350
351/* ISA Bridges */
352DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0050,
353 nvidia_force_enable_hpet);
354DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0051,
355 nvidia_force_enable_hpet);
324 356
325void force_hpet_resume(void) 357void force_hpet_resume(void)
326{ 358{
@@ -334,6 +366,9 @@ void force_hpet_resume(void)
334 case VT8237_FORCE_HPET_RESUME: 366 case VT8237_FORCE_HPET_RESUME:
335 return vt8237_force_hpet_resume(); 367 return vt8237_force_hpet_resume();
336 368
369 case NVIDIA_FORCE_HPET_RESUME:
370 return nvidia_force_hpet_resume();
371
337 default: 372 default:
338 break; 373 break;
339 } 374 }