MLK-21021: clk: imx8: Fix failure of set parent clock after resume
authorShengjiu Wang <shengjiu.wang@nxp.com>
Fri, 15 Mar 2019 05:51:49 +0000 (13:51 +0800)
committerShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 7 May 2019 10:45:08 +0000 (18:45 +0800)
We need to set parent clock for some audio clock in dts,
when the system enter suspend, the whole audio subsystem
may be power off, the parent setting should be lost, so
we need to set CLK_SET_PARENT_NOCACHE flag in imx_clk_mux_scu,
to let the operation of reset parent clock in
drivers/soc/imx/pm-domains.c take effect.

This issue only occurs on imx8qm, not on imx8qxp, for on imx8qxp
the ADMA subsystem don't enter power off, there is other
device in power on state in suspend.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 5e8b48b90effa1aa2b9fbbd8919b131f6ad86946)

drivers/clk/imx/clk-imx8.h

index 05552b4..db1b577 100644 (file)
@@ -122,7 +122,8 @@ static inline struct clk *imx_clk_mux_scu(const char *name, void __iomem *reg,
                u8 shift, u8 width, const char **parents, int num_parents, const char *pd_name)
 {
        return clk_register_mux_scu(NULL, name, parents, num_parents,
-                       CLK_SET_RATE_NO_REPARENT, reg, shift,
+                       CLK_SET_RATE_NO_REPARENT | CLK_SET_PARENT_NOCACHE,
+                       reg, shift,
                        width, 0, &imx_ccm_lock, pd_name);
 }