aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBen Collins <bcollins@ubuntu.com>2006-01-19 02:45:39 -0500
committerDave Jones <davej@redhat.com>2006-01-26 13:44:11 -0500
commitc70ca00f77eb1bb69c5a2d029b3a911bc88eac1b (patch)
treef509a16ec43d064584e1ccd2073be85f1c21c712 /arch
parentcdc9cc1d740ffc3d8d8207fbf5df9bf05fcc9955 (diff)
[CPUFREQ] p4-clockmod: Workaround for CPU's with N60 errata
Ignore clock frequencies below 2Ghz for CPU's detected with N60 errata bug. Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/p4-clockmod.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
index 270f2188d68b..cc73a7ae34bc 100644
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
@@ -52,6 +52,7 @@ enum {
52 52
53 53
54static int has_N44_O17_errata[NR_CPUS]; 54static int has_N44_O17_errata[NR_CPUS];
55static int has_N60_errata[NR_CPUS];
55static unsigned int stock_freq; 56static unsigned int stock_freq;
56static struct cpufreq_driver p4clockmod_driver; 57static struct cpufreq_driver p4clockmod_driver;
57static unsigned int cpufreq_p4_get(unsigned int cpu); 58static unsigned int cpufreq_p4_get(unsigned int cpu);
@@ -226,6 +227,12 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
226 case 0x0f12: 227 case 0x0f12:
227 has_N44_O17_errata[policy->cpu] = 1; 228 has_N44_O17_errata[policy->cpu] = 1;
228 dprintk("has errata -- disabling low frequencies\n"); 229 dprintk("has errata -- disabling low frequencies\n");
230 break;
231
232 case 0x0f29:
233 has_N60_errata[policy->cpu] = 1;
234 dprintk("has errata -- disabling frequencies lower than 2ghz\n");
235 break;
229 } 236 }
230 237
231 /* get max frequency */ 238 /* get max frequency */
@@ -237,6 +244,8 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
237 for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { 244 for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) {
238 if ((i<2) && (has_N44_O17_errata[policy->cpu])) 245 if ((i<2) && (has_N44_O17_errata[policy->cpu]))
239 p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; 246 p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
247 else if (has_N60_errata[policy->cpu] && p4clockmod_table[i].frequency < 2000000)
248 p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
240 else 249 else
241 p4clockmod_table[i].frequency = (stock_freq * i)/8; 250 p4clockmod_table[i].frequency = (stock_freq * i)/8;
242 } 251 }