diff mbox series

clk: imx: Fix imx8m_clk_hw_composite_core flags

Message ID 7d118c8ad52e87a7cadb438097fcdfbeeb822dd7.1578958643.git.leonard.crestez@nxp.com (mailing list archive)
State Superseded
Headers show
Series clk: imx: Fix imx8m_clk_hw_composite_core flags | expand

Commit Message

Leonard Crestez Jan. 13, 2020, 11:42 p.m. UTC
Just like other imx8m composites the "core" slice needs the
CLK_SET_RATE_NO_REPARENT and CLK_OPS_PARENT_ENABLE flags. It is not
clear why they were omitted.

In particular without the CLK_OPS_PARENT_ENABLE flag the system can hang
when attempting to disable a clock whose parent is disabled. This
current happens for arm_m4_div on imx8mm-evk, breaking boot.

Fixes: 5fcdb45497a0 ("clk: imx: composite-8m: add imx8m_clk_hw_composite_core")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>

---
Since this is a very recent breakage (just next-20200113) the fix should
probably be squashed.

 drivers/clk/imx/clk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peng Fan Jan. 14, 2020, 12:41 a.m. UTC | #1
> Subject: [PATCH] clk: imx: Fix imx8m_clk_hw_composite_core flags
> 
> Just like other imx8m composites the "core" slice needs the
> CLK_SET_RATE_NO_REPARENT and CLK_OPS_PARENT_ENABLE flags. It is not
> clear why they were omitted.
> 
> In particular without the CLK_OPS_PARENT_ENABLE flag the system can hang
> when attempting to disable a clock whose parent is disabled. This current
> happens for arm_m4_div on imx8mm-evk, breaking boot.
> 
> Fixes: 5fcdb45497a0 ("clk: imx: composite-8m: add
> imx8m_clk_hw_composite_core")
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>

My bad. Thanks for the fix.

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> 
> ---
> Since this is a very recent breakage (just next-20200113) the fix should
> probably be squashed.
> 
>  drivers/clk/imx/clk.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index
> cd2a60c10a71..17a66a4290fb 100644
> --- a/drivers/clk/imx/clk.h
> +++ b/drivers/clk/imx/clk.h
> @@ -487,11 +487,11 @@ struct clk_hw
> *imx8m_clk_hw_composite_flags(const char *name,
>  					    unsigned long flags);
> 
>  #define imx8m_clk_hw_composite_core(name, parent_names, reg)	\
>  	imx8m_clk_hw_composite_flags(name, parent_names, \
>  			ARRAY_SIZE(parent_names), reg, \
> -			IMX_COMPOSITE_CORE, 0)
> +			IMX_COMPOSITE_CORE, CLK_SET_RATE_NO_REPARENT |
> +CLK_OPS_PARENT_ENABLE)
> 
>  #define imx8m_clk_composite_flags(name, parent_names, num_parents,
> reg, \
>  				  flags) \
>  	to_clk(imx8m_clk_hw_composite_flags(name, parent_names, \
>  				num_parents, reg, 0, flags))
> --
> 2.17.1
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index cd2a60c10a71..17a66a4290fb 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -487,11 +487,11 @@  struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
 					    unsigned long flags);
 
 #define imx8m_clk_hw_composite_core(name, parent_names, reg)	\
 	imx8m_clk_hw_composite_flags(name, parent_names, \
 			ARRAY_SIZE(parent_names), reg, \
-			IMX_COMPOSITE_CORE, 0)
+			IMX_COMPOSITE_CORE, CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE)
 
 #define imx8m_clk_composite_flags(name, parent_names, num_parents, reg, \
 				  flags) \
 	to_clk(imx8m_clk_hw_composite_flags(name, parent_names, \
 				num_parents, reg, 0, flags))