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>steinar/wifi_calib_4_9_kernel
parent
c7c1b39ff9
commit
f4a26d77ae
|
@ -89,6 +89,7 @@
|
|||
clock-frequency = <792000000>;
|
||||
clock-latency = <61036>; /* two CLK32 periods */
|
||||
clocks = <&clks IMX7D_CLK_ARM>;
|
||||
clock-names = "arm";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue