|
@@ -138,22 +138,14 @@ static void powernow_k6_set_cpu_multiplier(unsigned int best_i)
|
|
static int powernow_k6_target(struct cpufreq_policy *policy,
|
|
static int powernow_k6_target(struct cpufreq_policy *policy,
|
|
unsigned int best_i)
|
|
unsigned int best_i)
|
|
{
|
|
{
|
|
- struct cpufreq_freqs freqs;
|
|
|
|
|
|
|
|
if (clock_ratio[best_i].driver_data > max_multiplier) {
|
|
if (clock_ratio[best_i].driver_data > max_multiplier) {
|
|
printk(KERN_ERR PFX "invalid target frequency\n");
|
|
printk(KERN_ERR PFX "invalid target frequency\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- freqs.old = busfreq * powernow_k6_get_cpu_multiplier();
|
|
|
|
- freqs.new = busfreq * clock_ratio[best_i].driver_data;
|
|
|
|
-
|
|
|
|
- cpufreq_freq_transition_begin(policy, &freqs);
|
|
|
|
-
|
|
|
|
powernow_k6_set_cpu_multiplier(best_i);
|
|
powernow_k6_set_cpu_multiplier(best_i);
|
|
|
|
|
|
- cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -229,8 +221,18 @@ static int powernow_k6_cpu_exit(struct cpufreq_policy *policy)
|
|
unsigned int i;
|
|
unsigned int i;
|
|
|
|
|
|
for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
|
|
for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
|
|
- if (clock_ratio[i].driver_data == max_multiplier)
|
|
|
|
|
|
+ if (clock_ratio[i].driver_data == max_multiplier) {
|
|
|
|
+ struct cpufreq_freqs freqs;
|
|
|
|
+
|
|
|
|
+ freqs.old = policy->cur;
|
|
|
|
+ freqs.new = clock_ratio[i].frequency;
|
|
|
|
+ freqs.flags = 0;
|
|
|
|
+
|
|
|
|
+ cpufreq_freq_transition_begin(policy, &freqs);
|
|
powernow_k6_target(policy, i);
|
|
powernow_k6_target(policy, i);
|
|
|
|
+ cpufreq_freq_transition_end(policy, &freqs, 0);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|