diff options
author | Tang Yuantian <Yuantian.Tang@freescale.com> | 2015-01-21 06:37:52 (GMT) |
---|---|---|
committer | Zhengxiong Jin <Jason.Jin@freescale.com> | 2015-02-05 08:08:08 (GMT) |
commit | 5d425486f5e6780a5c2655558d319ffe97bac525 (patch) | |
tree | ee4d8ed29fae741243eed2fbb8536c234ca61927 /drivers | |
parent | 6619b8b55796cdf0cec04b66a71288edd3057229 (diff) | |
download | linux-fsl-qoriq-5d425486f5e6780a5c2655558d319ffe97bac525.tar.xz |
cpufreq: qoriq: fixed a clock setting error
Currently, CPU frequency switching is bypassed when T4240
workaround is not applied. It will cause DFS on non-t4240
not working.
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Change-Id: I61d528d490d50442c8361caaf2882fbf14eb0f1f
Reviewed-on: http://git.am.freescale.net:8181/28853
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Hongtao Jia <hongtao.jia@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/qoriq-cpufreq.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 16c1e7b..76a8e25 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -390,8 +390,8 @@ static int qoriq_cpufreq_target(struct cpufreq_policy *policy, struct clk *parent; int ret; struct cpu_data *data = per_cpu(cpu_data, policy->cpu); -#if (defined(CONFIG_PPC) && defined(CONFIG_HOTPLUG_CPU)) int workaround = 0; +#if (defined(CONFIG_PPC) && defined(CONFIG_HOTPLUG_CPU)) /* * workaround should be applied on 2 conditions: @@ -420,12 +420,18 @@ static int qoriq_cpufreq_target(struct cpufreq_policy *policy, parent = of_clk_get(data->parent, data->table[new].driver_data); #if (defined(CONFIG_PPC) && defined(CONFIG_HOTPLUG_CPU)) - if (t4240_workaround == 1) { + if (workaround == 1) { freqs.new = freqs.old; ret = -1; } #endif + if (workaround == 0) { + ret = clk_set_parent(data->clk, parent); + if (ret) + ret = -1; + } + cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); mutex_unlock(&cpufreq_lock); |