diff options
author | Bai Ping <b51503@freescale.com> | 2015-02-28 19:19:56 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:20:42 +0300 |
commit | b2990d06429aefaf707263b94879cc162676ab78 (patch) | |
tree | e56ec11e12476f2698b4c313e94dcfad768af1f5 /drivers/cpufreq | |
parent | ef363b04f96fcbe1d79ecdcb01b9ed50e43802e2 (diff) |
MLK-10271 cpufreq: imx6: improve busfreq operation when wehn setpoint lower than 396MHz
for i.MX6SX, according to the latest datasheet, added a 198MHz setpoint in cpufreq driver.
The 198MHz setpoint is NOT enough to support playing mp3,the system will stay at a higher
setpoint and high_bus_mode. So when having a setpoint lower than 396MHz, make sure when
the cpufreq is at 396MHz or lower, the busfreq is always in low_bus_mode to save more power.
Signed-off-by: Bai Ping <b51503@freescale.com>
(cherry picked from commit 3ba9548200ffb2c85111dd84946046ae0c7b09c4)
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/imx6q-cpufreq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 6955a0e77a42..479979fbade6 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -20,6 +20,7 @@ #define PU_SOC_VOLTAGE_NORMAL 1250000 #define PU_SOC_VOLTAGE_HIGH 1275000 #define FREQ_1P2_GHZ 1200000000 +#define FREQ_396_MHZ 396000 static struct regulator *arm_reg; static struct regulator *pu_reg; @@ -76,7 +77,7 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) * CPU freq is increasing, so need to ensure * that bus frequency is increased too. */ - if (old_freq == freq_table[0].frequency) + if (old_freq <= FREQ_396_MHZ && new_freq > FREQ_396_MHZ) request_bus_freq(BUS_FREQ_HIGH); /* scaling up? scale voltage before frequency */ @@ -170,7 +171,7 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) * If CPU is dropped to the lowest level, release the need * for a high bus frequency. */ - if (new_freq == freq_table[0].frequency) + if (old_freq > FREQ_396_MHZ && new_freq <= FREQ_396_MHZ) release_bus_freq(BUS_FREQ_HIGH); return 0; @@ -188,9 +189,8 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy) dev_err(cpu_dev, "imx6 cpufreq init failed!\n"); return ret; } - if (policy->cur > freq_table[0].frequency) + if (policy->cur > FREQ_396_MHZ) request_bus_freq(BUS_FREQ_HIGH); - return 0; } |