diff options
author | Bai Ping <b51503@freescale.com> | 2014-10-31 16:28:03 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:23:16 +0800 |
commit | f25a1d0e3f7b5c4d00322d2bc0c36cf91ddb1dbc (patch) | |
tree | ab650bcfb0414fd18b2545692ecb7cc8be4cab35 /drivers/cpufreq/imx6q-cpufreq.c | |
parent | 2b42c8fc6f5718770acb87e1b3caf24ee33331fd (diff) |
MLK-9777 cpufreq: imx6: fix the high bus count mismatch
Normally, the system is booting up with higher cpufreq. In the
cpufreq set_target_index we will release the high bus mode if
the target cpu frequency is the lowest. It will release the high
bus mode and dcrease the high_bus_count.This will lead to a wrong
release of high bus mode. So, in the cpufreq_init function, if the
original frequency is not the lowest, we need request high busfreq.
Signed-off-by: Bai Ping <b51503@freescale.com>
Diffstat (limited to 'drivers/cpufreq/imx6q-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/imx6q-cpufreq.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 7f6ed1f23d3d..cd565c293989 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -202,10 +202,17 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy) int ret; policy->clk = arm_clk; + policy->cur = clk_get_rate(arm_clk) / 1000; ret = cpufreq_generic_init(policy, freq_table, transition_latency); policy->suspend_freq = policy->max; + if (ret) { + dev_err(cpu_dev, "imx6 cpufreq init failed!\n"); + return ret; + } + if (policy->cur > freq_table[0].frequency) + request_bus_freq(BUS_FREQ_HIGH); - return ret; + return 0; } static struct cpufreq_driver imx6q_cpufreq_driver = { |