]> git.baikalelectronics.ru Git - kernel.git/commit
clk: imx7ulp: make it easy to change ARM core clk
authorPeng Fan <peng.fan@nxp.com>
Mon, 16 Mar 2020 08:32:33 +0000 (16:32 +0800)
committerShawn Guo <shawnguo@kernel.org>
Tue, 14 Apr 2020 13:35:58 +0000 (21:35 +0800)
commit7567d7457f3a8b45b4c45f577d251b6bb4fb785e
treebbdc467744061a04dc167ae599bada0e7179ecf0
parent599fe7e217188b51c22fa88adce788d571b3c5be
clk: imx7ulp: make it easy to change ARM core clk

ARM clk could only source from divcore or hsrun_divcore.

Follow what we already used on i.MX7D and i.MX8M SoCs, use
imx_clk_hw_cpu API. When ARM core is running normaly,
whether divcore or hwrun_divcore will finally source
from SPLL_PFD0. However SPLL_PFD0 is marked with CLK_SET_GATE,
so we need to disable SPLL_PFD0, when configure the rate.
So add CORE and HSRUN_CORE virtual clk to make it easy to
configure the clk using imx_clk_hw_cpu API.

Since CORE and HSRUN_CORE already marked with CLK_IS_CRITICAL, no
need to set ARM as CLK_IS_CRITICAL. And when set the rate of ARM clk,
prograting it the parent with CLK_SET_RATE_PARENT will finally set
the SPLL_PFD0 clk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/clk/imx/clk-imx7ulp.c
include/dt-bindings/clock/imx7ulp-clock.h