Message ID | 20210604090943.3519350-4-aisheng.dong@nxp.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
Series | clk: imx: scu: add more scu clock features | expand |
On 21-06-04 17:09:36, Dong Aisheng wrote: > CPU clock is managed by ATF. No need save and restore. > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Looks good to me. Reviewed-by: Abel Vesa <abel.vesa@nxp.com> > --- > drivers/clk/imx/clk-scu.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c > index 680b2650fd45..d87a1a1b297e 100644 > --- a/drivers/clk/imx/clk-scu.c > +++ b/drivers/clk/imx/clk-scu.c > @@ -538,6 +538,11 @@ static int imx_clk_scu_probe(struct platform_device *pdev) > static int __maybe_unused imx_clk_scu_suspend(struct device *dev) > { > struct clk_scu *clk = dev_get_drvdata(dev); > + u32 rsrc_id = clk->rsrc_id; > + > + if ((rsrc_id == IMX_SC_R_A35) || (rsrc_id == IMX_SC_R_A53) || > + (rsrc_id == IMX_SC_R_A72)) > + return 0; > > clk->rate = clk_hw_get_rate(&clk->hw); > clk->is_enabled = clk_hw_is_enabled(&clk->hw); > @@ -554,8 +559,13 @@ static int __maybe_unused imx_clk_scu_suspend(struct device *dev) > static int __maybe_unused imx_clk_scu_resume(struct device *dev) > { > struct clk_scu *clk = dev_get_drvdata(dev); > + u32 rsrc_id = clk->rsrc_id; > int ret = 0; > > + if ((rsrc_id == IMX_SC_R_A35) || (rsrc_id == IMX_SC_R_A53) || > + (rsrc_id == IMX_SC_R_A72)) > + return 0; > + > if (clk->rate) { > ret = clk_scu_set_rate(&clk->hw, clk->rate, 0); > dev_dbg(dev, "restore rate %d %s\n", clk->rate, > -- > 2.25.1 >
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c index 680b2650fd45..d87a1a1b297e 100644 --- a/drivers/clk/imx/clk-scu.c +++ b/drivers/clk/imx/clk-scu.c @@ -538,6 +538,11 @@ static int imx_clk_scu_probe(struct platform_device *pdev) static int __maybe_unused imx_clk_scu_suspend(struct device *dev) { struct clk_scu *clk = dev_get_drvdata(dev); + u32 rsrc_id = clk->rsrc_id; + + if ((rsrc_id == IMX_SC_R_A35) || (rsrc_id == IMX_SC_R_A53) || + (rsrc_id == IMX_SC_R_A72)) + return 0; clk->rate = clk_hw_get_rate(&clk->hw); clk->is_enabled = clk_hw_is_enabled(&clk->hw); @@ -554,8 +559,13 @@ static int __maybe_unused imx_clk_scu_suspend(struct device *dev) static int __maybe_unused imx_clk_scu_resume(struct device *dev) { struct clk_scu *clk = dev_get_drvdata(dev); + u32 rsrc_id = clk->rsrc_id; int ret = 0; + if ((rsrc_id == IMX_SC_R_A35) || (rsrc_id == IMX_SC_R_A53) || + (rsrc_id == IMX_SC_R_A72)) + return 0; + if (clk->rate) { ret = clk_scu_set_rate(&clk->hw, clk->rate, 0); dev_dbg(dev, "restore rate %d %s\n", clk->rate,
CPU clock is managed by ATF. No need save and restore. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> --- drivers/clk/imx/clk-scu.c | 10 ++++++++++ 1 file changed, 10 insertions(+)