aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/speedstep-centrino.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/speedstep-centrino.c')
-rw-r--r--drivers/cpufreq/speedstep-centrino.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c
index 6ea3455def21..3a953d519f46 100644
--- a/drivers/cpufreq/speedstep-centrino.c
+++ b/drivers/cpufreq/speedstep-centrino.c
@@ -25,6 +25,7 @@
25#include <asm/msr.h> 25#include <asm/msr.h>
26#include <asm/processor.h> 26#include <asm/processor.h>
27#include <asm/cpufeature.h> 27#include <asm/cpufeature.h>
28#include <asm/cpu_device_id.h>
28 29
29#define PFX "speedstep-centrino: " 30#define PFX "speedstep-centrino: "
30#define MAINTAINER "cpufreq@vger.kernel.org" 31#define MAINTAINER "cpufreq@vger.kernel.org"
@@ -595,6 +596,24 @@ static struct cpufreq_driver centrino_driver = {
595 .owner = THIS_MODULE, 596 .owner = THIS_MODULE,
596}; 597};
597 598
599/*
600 * This doesn't replace the detailed checks above because
601 * the generic CPU IDs don't have a way to match for steppings
602 * or ASCII model IDs.
603 */
604static const struct x86_cpu_id centrino_ids[] = {
605 { X86_VENDOR_INTEL, 6, 9, X86_FEATURE_EST },
606 { X86_VENDOR_INTEL, 6, 13, X86_FEATURE_EST },
607 { X86_VENDOR_INTEL, 6, 13, X86_FEATURE_EST },
608 { X86_VENDOR_INTEL, 6, 13, X86_FEATURE_EST },
609 { X86_VENDOR_INTEL, 15, 3, X86_FEATURE_EST },
610 { X86_VENDOR_INTEL, 15, 4, X86_FEATURE_EST },
611 {}
612};
613#if 0
614/* Autoload or not? Do not for now. */
615MODULE_DEVICE_TABLE(x86cpu, centrino_ids);
616#endif
598 617
599/** 618/**
600 * centrino_init - initializes the Enhanced SpeedStep CPUFreq driver 619 * centrino_init - initializes the Enhanced SpeedStep CPUFreq driver
@@ -612,11 +631,8 @@ static struct cpufreq_driver centrino_driver = {
612 */ 631 */
613static int __init centrino_init(void) 632static int __init centrino_init(void)
614{ 633{
615 struct cpuinfo_x86 *cpu = &cpu_data(0); 634 if (!x86_match_cpu(centrino_ids))
616
617 if (!cpu_has(cpu, X86_FEATURE_EST))
618 return -ENODEV; 635 return -ENODEV;
619
620 return cpufreq_register_driver(&centrino_driver); 636 return cpufreq_register_driver(&centrino_driver);
621} 637}
622 638