diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-10-21 12:38:03 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-10-21 12:38:03 +0100 |
commit | a2af5c73d7233ad65d1ee41987d4c875f588a17c (patch) | |
tree | 84f44026aa460fb4462b1db50cf122a41c4941b3 | |
parent | 776b352cd7662570d4bed27e1afecddba61699dc (diff) | |
parent | 37fdfec2a7baab7fde70269a6e1285ce4d856a59 (diff) |
Merge branch 'tracking-armlt-fixes' into integration-linaro-vexpress
-rw-r--r-- | drivers/cpufreq/arm_big_little.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index f1e42f8ce0fc..c5d256caa664 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -149,6 +149,19 @@ bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate) __func__, cpu, old_cluster, new_cluster, new_rate); ret = clk_set_rate(clk[new_cluster], new_rate * 1000); + if (!ret) { + /* + * FIXME: clk_set_rate hasn't returned an error here however it + * may be that clk_change_rate failed due to hardware or + * firmware issues and wasn't able to report that due to the + * current design of the clk core layer. To work around this + * problem we will read back the clock rate and check it is + * correct. This needs to be removed once clk core is fixed. + */ + if (clk_get_rate(clk[new_cluster]) != new_rate * 1000) + ret = -EIO; + } + if (WARN_ON(ret)) { pr_err("clk_set_rate failed: %d, new cluster: %d\n", ret, new_cluster); @@ -189,15 +202,6 @@ bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate) mutex_unlock(&cluster_lock[old_cluster]); } - /* - * FIXME: clk_set_rate has to handle the case where clk_change_rate - * can fail due to hardware or firmware issues. Until the clk core - * layer is fixed, we can check here. In most of the cases we will - * be reading only the cached value anyway. This needs to be removed - * once clk core is fixed. - */ - if (bL_cpufreq_get_rate(cpu) != new_rate) - return -EIO; return 0; } |