diff options
author | Irina Tirdea <irina.tirdea@nxp.com> | 2017-02-20 10:36:06 +0200 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 715fc6819d389b4bcb4c215aeef51cf4c14edb90 (patch) | |
tree | b71ea8878400c9f1196c438714a6d05665f89db7 /drivers/cpufreq | |
parent | 55fbfbca1fe6066bc9ae3e4d6089106794dfd700 (diff) |
MLK-13869 cpufreq: imx7: use updated arm clk
The "arm" clock for imx7d has been modified to encapsulate
all other clocks needed for normal functioning ("arm_root_src",
"pll_arm", "pll_sys_main"). Modify cpufreq to use the new
version of "arm" clock.
Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/imx7-cpufreq.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/cpufreq/imx7-cpufreq.c b/drivers/cpufreq/imx7-cpufreq.c index b13126d0dcbd..32f30cec04ff 100644 --- a/drivers/cpufreq/imx7-cpufreq.c +++ b/drivers/cpufreq/imx7-cpufreq.c @@ -17,9 +17,6 @@ #include <linux/regulator/consumer.h> #include <linux/suspend.h> static struct clk *arm_clk; -static struct clk *pll_arm; -static struct clk *arm_src; -static struct clk *pll_sys_main; static struct regulator *arm_reg; @@ -68,13 +65,6 @@ static int imx7d_set_target(struct cpufreq_policy *policy, unsigned int index) } } - /* before changing pll_arm rate, change the arm_src's soure - * to pll_sys_main clk first. - */ - clk_set_parent(arm_src, pll_sys_main); - clk_set_rate(pll_arm, new_freq * 1000); - clk_set_parent(arm_src, pll_arm); - /* change the cpu frequency */ ret = clk_set_rate(arm_clk, new_freq * 1000); if (ret) { @@ -180,14 +170,9 @@ static int imx7d_cpufreq_probe(struct platform_device *pdev) } arm_clk = devm_clk_get(cpu_dev, "arm"); - arm_src = devm_clk_get(cpu_dev, "arm_root_src"); - pll_arm = devm_clk_get(cpu_dev, "pll_arm"); - pll_sys_main = devm_clk_get(cpu_dev, "pll_sys_main"); - - if (IS_ERR(arm_clk) || IS_ERR(arm_src) || IS_ERR(pll_arm) || - IS_ERR(pll_sys_main)) { - dev_err(cpu_dev, "failed to get clocks\n"); - ret = -ENOENT; + if (IS_ERR(arm_clk)) { + dev_err(cpu_dev, "failed to get arm clock\n"); + ret = PTR_ERR(arm_clk); goto put_node; } |