Skip to content

Commit 7487986

Browse files
Anson-Huangabelvesa
authored andcommitted
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 <[email protected]> Signed-off-by: Dong Aisheng <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Signed-off-by: Abel Vesa <[email protected]>
1 parent a43f6e8 commit 7487986

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/clk/imx/clk-scu.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,14 @@ static int __maybe_unused imx_clk_scu_suspend(struct device *dev)
547547
(rsrc_id == IMX_SC_R_A72))
548548
return 0;
549549

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);
551558
clk->is_enabled = clk_hw_is_enabled(&clk->hw);
552559

553560
if (clk->rate)

0 commit comments

Comments
 (0)