diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 3 | ||||
-rw-r--r-- | arch/x86/kernel/quirks.c | 37 |
2 files changed, 38 insertions, 2 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b2361667839f..a13d69b2217d 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -422,7 +422,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
422 | hpet= [X86-32,HPET] option to control HPET usage | 422 | hpet= [X86-32,HPET] option to control HPET usage |
423 | Format: { enable (default) | disable | force } | 423 | Format: { enable (default) | disable | force } |
424 | disable: disable HPET and use PIT instead | 424 | disable: disable HPET and use PIT instead |
425 | force: allow force enabled of undocumented chips (ICH4, VIA) | 425 | force: allow force enabled of undocumented chips (ICH4, |
426 | VIA, nVidia) | ||
426 | 427 | ||
427 | com20020= [HW,NET] ARCnet - COM20020 chipset | 428 | com20020= [HW,NET] ARCnet - COM20020 chipset |
428 | Format: | 429 | Format: |
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 | ||
66 | static void __iomem *rcba_base; | 67 | static void __iomem *rcba_base; |
@@ -321,6 +322,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, | |||
321 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | 322 | DECLARE_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 | */ | ||
328 | static 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 | |||
334 | static 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 */ | ||
352 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0050, | ||
353 | nvidia_force_enable_hpet); | ||
354 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, 0x0051, | ||
355 | nvidia_force_enable_hpet); | ||
324 | 356 | ||
325 | void force_hpet_resume(void) | 357 | void 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 | } |