From: Leo Yan <[email protected]>

commit 9f77a60669d13ed4ddfa6cd7374c9d88da378ffa upstream.

clk_gate_ufs_subsys is a system bus clock, turning off it will
introduce lockup issue during system suspend flow.  Let's mark
clk_gate_ufs_subsys as critical clock, thus keeps it on during
system suspend and resume.

Fixes: d374e6fd5088 ("clk: hisilicon: Add clock driver for hi3660 SoC")
Cc: [email protected]
Cc: Zhong Kaihua <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Zhangfei Gao <[email protected]>
Suggested-by: Dong Zhang <[email protected]>
Signed-off-by: Leo Yan <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/clk/hisilicon/clk-hi3660.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/clk/hisilicon/clk-hi3660.c
+++ b/drivers/clk/hisilicon/clk-hi3660.c
@@ -163,8 +163,12 @@ static const struct hisi_gate_clock hi36
          "clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 17, 0, },
        { HI3660_CLK_GATE_ISP_SNCLK2, "clk_gate_isp_snclk2",
          "clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 18, 0, },
+       /*
+        * clk_gate_ufs_subsys is a system bus clock, mark it as critical
+        * clock and keep it on for system suspend and resume.
+        */
        { HI3660_CLK_GATE_UFS_SUBSYS, "clk_gate_ufs_subsys", "clk_div_sysbus",
-         CLK_SET_RATE_PARENT, 0x50, 21, 0, },
+         CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x50, 21, 0, },
        { HI3660_PCLK_GATE_DSI0, "pclk_gate_dsi0", "clk_div_cfgbus",
          CLK_SET_RATE_PARENT, 0x50, 28, 0, },
        { HI3660_PCLK_GATE_DSI1, "pclk_gate_dsi1", "clk_div_cfgbus",


Reply via email to