Commit 2abb7019 authored by Olof Johansson's avatar Olof Johansson Committed by Paul Mackerras

[POWERPC] pasemi: Update ppc_proc_freq from cpufreq driver

Update the global cpu speed variable according to current cpufreq speed,
/proc/cpuinfo reports the actual speed.
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 543b9fd3
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/time.h>
#define SDCASR_REG 0x0100 #define SDCASR_REG 0x0100
#define SDCASR_REG_STRIDE 0x1000 #define SDCASR_REG_STRIDE 0x1000
...@@ -204,6 +205,8 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) ...@@ -204,6 +205,8 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
policy->cur = pas_freqs[cur_astate].frequency; policy->cur = pas_freqs[cur_astate].frequency;
policy->cpus = cpu_online_map; policy->cpus = cpu_online_map;
ppc_proc_freq = policy->cur * 1000ul;
cpufreq_frequency_table_get_attr(pas_freqs, policy->cpu); cpufreq_frequency_table_get_attr(pas_freqs, policy->cpu);
/* this ensures that policy->cpuinfo_min and policy->cpuinfo_max /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max
...@@ -270,6 +273,7 @@ static int pas_cpufreq_target(struct cpufreq_policy *policy, ...@@ -270,6 +273,7 @@ static int pas_cpufreq_target(struct cpufreq_policy *policy,
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
mutex_unlock(&pas_switch_mutex); mutex_unlock(&pas_switch_mutex);
ppc_proc_freq = freqs.new * 1000ul;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment