diff options
author | Andreas Herrmann <andreas.herrmann3@amd.com> | 2008-05-09 05:49:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:27:54 -0400 |
commit | e8aa4667baf74dfd85fbaab86861465acb811085 (patch) | |
tree | c22f6f34099bb6749d2b848531ae84ecf626a93d /arch/x86/kernel/quirks.c | |
parent | 6fd592daae2182adc47f405e20d07f34f52d07dd (diff) |
x86: enable hpet=force for AMD SB400
Add quirk to allow forced usage of HPET on ATI SB400.
I stumbled over machines where HPET is enabled but not reported
by BIOS. This patch configures the HPET base address and makes
it known to the OS.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/quirks.c')
-rw-r--r-- | arch/x86/kernel/quirks.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index d89a648fe710..5fe6bd5cc4c7 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; |
@@ -330,6 +331,31 @@ 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, | 331 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, |
331 | vt8237_force_enable_hpet); | 332 | vt8237_force_enable_hpet); |
332 | 333 | ||
334 | static void ati_force_hpet_resume(void) | ||
335 | { | ||
336 | pci_write_config_dword(cached_dev, 0x14, 0xfed00000); | ||
337 | printk(KERN_DEBUG "Force enabled HPET at resume\n"); | ||
338 | } | ||
339 | |||
340 | static void ati_force_enable_hpet(struct pci_dev *dev) | ||
341 | { | ||
342 | u32 uninitialized_var(val); | ||
343 | |||
344 | if (!hpet_force_user || hpet_address || force_hpet_address) | ||
345 | return; | ||
346 | |||
347 | pci_write_config_dword(dev, 0x14, 0xfed00000); | ||
348 | pci_read_config_dword(dev, 0x14, &val); | ||
349 | force_hpet_address = val; | ||
350 | force_hpet_resume_type = ATI_FORCE_HPET_RESUME; | ||
351 | dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at 0x%lx\n", | ||
352 | force_hpet_address); | ||
353 | cached_dev = dev; | ||
354 | return; | ||
355 | } | ||
356 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, | ||
357 | ati_force_enable_hpet); | ||
358 | |||
333 | /* | 359 | /* |
334 | * Undocumented chipset feature taken from LinuxBIOS. | 360 | * Undocumented chipset feature taken from LinuxBIOS. |
335 | */ | 361 | */ |
@@ -397,6 +423,9 @@ void force_hpet_resume(void) | |||
397 | case NVIDIA_FORCE_HPET_RESUME: | 423 | case NVIDIA_FORCE_HPET_RESUME: |
398 | nvidia_force_hpet_resume(); | 424 | nvidia_force_hpet_resume(); |
399 | return; | 425 | return; |
426 | case ATI_FORCE_HPET_RESUME: | ||
427 | ati_force_hpet_resume(); | ||
428 | return; | ||
400 | default: | 429 | default: |
401 | break; | 430 | break; |
402 | } | 431 | } |