aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorCarlos Corbacho <cathectic@gmail.com>2007-10-19 13:51:27 -0400
committerThomas Gleixner <tglx@linutronix.de>2007-10-23 16:37:25 -0400
commitd79a5f80dc1153d3f637dfcf3808066414fbb51a (patch)
treea9278d7d4c922483bdfb5ed29a2225a34bda2604 /arch/x86
parentfa76dab935b856871024530ec818bc0a8f88a016 (diff)
x86: Force enable HPET for CK804 (nForce 4) chipsets
This patch adds a quirk from LinuxBIOS to force enable HPET on the nVidia CK804 (nForce 4) chipset. This quirk can very likely support more than just nForce 4 (LinuxBIOS use the same code for nForce 5), and possibly nForce 3, but I don't have those chipsets, so cannot add and test them. Tested on an Abit KN9 (CK804). Signed-off-by: Carlos Corbacho <cathectic@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Documentation/kernel-parameters.txt | 3 +- arch/x86/kernel/quirks.c | 37 +++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-)
Diffstat (limited to 'arch/x86')
-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 }