Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: imx: scu: Only save DC SS clock using non-cached clock rate

Display sub-system has special clock settings in SCFW, the
bypassed clock is used instead of PLL in Linux kernel clock
tree, so when saving clock rate, need to save non-cached clock
rate for Display sub-system's bypass clocks, and other clocks
still use the cached clock rate which is with runtime PM ON.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

authored by

Anson Huang and committed by
Abel Vesa
7487986c a43f6e8a

+8 -1
+8 -1
drivers/clk/imx/clk-scu.c
··· 547 547 (rsrc_id == IMX_SC_R_A72)) 548 548 return 0; 549 549 550 - clk->rate = clk_hw_get_rate(&clk->hw); 550 + /* DC SS needs to handle bypass clock using non-cached clock rate */ 551 + if (clk->rsrc_id == IMX_SC_R_DC_0_VIDEO0 || 552 + clk->rsrc_id == IMX_SC_R_DC_0_VIDEO1 || 553 + clk->rsrc_id == IMX_SC_R_DC_1_VIDEO0 || 554 + clk->rsrc_id == IMX_SC_R_DC_1_VIDEO1) 555 + clk->rate = clk_scu_recalc_rate(&clk->hw, 0); 556 + else 557 + clk->rate = clk_hw_get_rate(&clk->hw); 551 558 clk->is_enabled = clk_hw_is_enabled(&clk->hw); 552 559 553 560 if (clk->rate)