All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
@ 2024-02-23 10:15 ` Shengjiu Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Shengjiu Wang @ 2024-02-23 10:15 UTC (permalink / raw)
  To: abelvesa, peng.fan, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, linux-imx, shengjiu.wang, marex, m.felsch
  Cc: linux-clk, linux-arm-kernel, linux-kernel

There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
is not match with the usage of CLK_SAIn(n).

So define SAI##n##_MCLK_SEL separately to fix the issue.

Fixes: 6cd95f7b151c ("clk: imx: imx8mp: Add audiomix block control")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 drivers/clk/imx/clk-imx8mp-audiomix.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c
index e4300df88f1a..55ed211a5e0b 100644
--- a/drivers/clk/imx/clk-imx8mp-audiomix.c
+++ b/drivers/clk/imx/clk-imx8mp-audiomix.c
@@ -18,7 +18,12 @@
 
 #define CLKEN0			0x000
 #define CLKEN1			0x004
-#define SAI_MCLK_SEL(n)		(0x300 + 4 * (n))	/* n in 0..5 */
+#define SAI1_MCLK_SEL		0x300
+#define SAI2_MCLK_SEL		0x304
+#define SAI3_MCLK_SEL		0x308
+#define SAI5_MCLK_SEL		0x30C
+#define SAI6_MCLK_SEL		0x310
+#define SAI7_MCLK_SEL		0x314
 #define PDM_SEL			0x318
 #define SAI_PLL_GNRL_CTL	0x400
 
@@ -95,13 +100,13 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
 		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK1_SEL, {},		\
 		clk_imx8mp_audiomix_sai##n##_mclk1_parents,		\
 		ARRAY_SIZE(clk_imx8mp_audiomix_sai##n##_mclk1_parents), \
-		SAI_MCLK_SEL(n), 1, 0					\
+		SAI##n##_MCLK_SEL, 1, 0					\
 	}, {								\
 		"sai"__stringify(n)"_mclk2_sel",			\
 		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK2_SEL, {},		\
 		clk_imx8mp_audiomix_sai_mclk2_parents,			\
 		ARRAY_SIZE(clk_imx8mp_audiomix_sai_mclk2_parents),	\
-		SAI_MCLK_SEL(n), 4, 1					\
+		SAI##n##_MCLK_SEL, 4, 1					\
 	}, {								\
 		"sai"__stringify(n)"_ipg_cg",				\
 		IMX8MP_CLK_AUDIOMIX_SAI##n##_IPG,			\
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
@ 2024-02-23 10:15 ` Shengjiu Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Shengjiu Wang @ 2024-02-23 10:15 UTC (permalink / raw)
  To: abelvesa, peng.fan, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, linux-imx, shengjiu.wang, marex, m.felsch
  Cc: linux-clk, linux-arm-kernel, linux-kernel

There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
is not match with the usage of CLK_SAIn(n).

So define SAI##n##_MCLK_SEL separately to fix the issue.

Fixes: 6cd95f7b151c ("clk: imx: imx8mp: Add audiomix block control")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 drivers/clk/imx/clk-imx8mp-audiomix.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c
index e4300df88f1a..55ed211a5e0b 100644
--- a/drivers/clk/imx/clk-imx8mp-audiomix.c
+++ b/drivers/clk/imx/clk-imx8mp-audiomix.c
@@ -18,7 +18,12 @@
 
 #define CLKEN0			0x000
 #define CLKEN1			0x004
-#define SAI_MCLK_SEL(n)		(0x300 + 4 * (n))	/* n in 0..5 */
+#define SAI1_MCLK_SEL		0x300
+#define SAI2_MCLK_SEL		0x304
+#define SAI3_MCLK_SEL		0x308
+#define SAI5_MCLK_SEL		0x30C
+#define SAI6_MCLK_SEL		0x310
+#define SAI7_MCLK_SEL		0x314
 #define PDM_SEL			0x318
 #define SAI_PLL_GNRL_CTL	0x400
 
@@ -95,13 +100,13 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
 		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK1_SEL, {},		\
 		clk_imx8mp_audiomix_sai##n##_mclk1_parents,		\
 		ARRAY_SIZE(clk_imx8mp_audiomix_sai##n##_mclk1_parents), \
-		SAI_MCLK_SEL(n), 1, 0					\
+		SAI##n##_MCLK_SEL, 1, 0					\
 	}, {								\
 		"sai"__stringify(n)"_mclk2_sel",			\
 		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK2_SEL, {},		\
 		clk_imx8mp_audiomix_sai_mclk2_parents,			\
 		ARRAY_SIZE(clk_imx8mp_audiomix_sai_mclk2_parents),	\
-		SAI_MCLK_SEL(n), 4, 1					\
+		SAI##n##_MCLK_SEL, 4, 1					\
 	}, {								\
 		"sai"__stringify(n)"_ipg_cg",				\
 		IMX8MP_CLK_AUDIOMIX_SAI##n##_IPG,			\
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
  2024-02-23 10:15 ` Shengjiu Wang
@ 2024-02-26  9:04   ` Abel Vesa
  -1 siblings, 0 replies; 6+ messages in thread
From: Abel Vesa @ 2024-02-26  9:04 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: abelvesa, peng.fan, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, linux-imx, shengjiu.wang, marex, m.felsch, linux-clk,
	linux-arm-kernel, linux-kernel

On 24-02-23 18:15:51, Shengjiu Wang wrote:
> There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
> control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
> is not match with the usage of CLK_SAIn(n).
> 
> So define SAI##n##_MCLK_SEL separately to fix the issue.
> 
> Fixes: 6cd95f7b151c ("clk: imx: imx8mp: Add audiomix block control")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>

> ---
>  drivers/clk/imx/clk-imx8mp-audiomix.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c
> index e4300df88f1a..55ed211a5e0b 100644
> --- a/drivers/clk/imx/clk-imx8mp-audiomix.c
> +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c
> @@ -18,7 +18,12 @@
>  
>  #define CLKEN0			0x000
>  #define CLKEN1			0x004
> -#define SAI_MCLK_SEL(n)		(0x300 + 4 * (n))	/* n in 0..5 */
> +#define SAI1_MCLK_SEL		0x300
> +#define SAI2_MCLK_SEL		0x304
> +#define SAI3_MCLK_SEL		0x308
> +#define SAI5_MCLK_SEL		0x30C
> +#define SAI6_MCLK_SEL		0x310
> +#define SAI7_MCLK_SEL		0x314
>  #define PDM_SEL			0x318
>  #define SAI_PLL_GNRL_CTL	0x400
>  
> @@ -95,13 +100,13 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
>  		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK1_SEL, {},		\
>  		clk_imx8mp_audiomix_sai##n##_mclk1_parents,		\
>  		ARRAY_SIZE(clk_imx8mp_audiomix_sai##n##_mclk1_parents), \
> -		SAI_MCLK_SEL(n), 1, 0					\
> +		SAI##n##_MCLK_SEL, 1, 0					\
>  	}, {								\
>  		"sai"__stringify(n)"_mclk2_sel",			\
>  		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK2_SEL, {},		\
>  		clk_imx8mp_audiomix_sai_mclk2_parents,			\
>  		ARRAY_SIZE(clk_imx8mp_audiomix_sai_mclk2_parents),	\
> -		SAI_MCLK_SEL(n), 4, 1					\
> +		SAI##n##_MCLK_SEL, 4, 1					\
>  	}, {								\
>  		"sai"__stringify(n)"_ipg_cg",				\
>  		IMX8MP_CLK_AUDIOMIX_SAI##n##_IPG,			\
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
@ 2024-02-26  9:04   ` Abel Vesa
  0 siblings, 0 replies; 6+ messages in thread
From: Abel Vesa @ 2024-02-26  9:04 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: abelvesa, peng.fan, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, linux-imx, shengjiu.wang, marex, m.felsch, linux-clk,
	linux-arm-kernel, linux-kernel

On 24-02-23 18:15:51, Shengjiu Wang wrote:
> There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
> control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
> is not match with the usage of CLK_SAIn(n).
> 
> So define SAI##n##_MCLK_SEL separately to fix the issue.
> 
> Fixes: 6cd95f7b151c ("clk: imx: imx8mp: Add audiomix block control")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>

> ---
>  drivers/clk/imx/clk-imx8mp-audiomix.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c
> index e4300df88f1a..55ed211a5e0b 100644
> --- a/drivers/clk/imx/clk-imx8mp-audiomix.c
> +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c
> @@ -18,7 +18,12 @@
>  
>  #define CLKEN0			0x000
>  #define CLKEN1			0x004
> -#define SAI_MCLK_SEL(n)		(0x300 + 4 * (n))	/* n in 0..5 */
> +#define SAI1_MCLK_SEL		0x300
> +#define SAI2_MCLK_SEL		0x304
> +#define SAI3_MCLK_SEL		0x308
> +#define SAI5_MCLK_SEL		0x30C
> +#define SAI6_MCLK_SEL		0x310
> +#define SAI7_MCLK_SEL		0x314
>  #define PDM_SEL			0x318
>  #define SAI_PLL_GNRL_CTL	0x400
>  
> @@ -95,13 +100,13 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
>  		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK1_SEL, {},		\
>  		clk_imx8mp_audiomix_sai##n##_mclk1_parents,		\
>  		ARRAY_SIZE(clk_imx8mp_audiomix_sai##n##_mclk1_parents), \
> -		SAI_MCLK_SEL(n), 1, 0					\
> +		SAI##n##_MCLK_SEL, 1, 0					\
>  	}, {								\
>  		"sai"__stringify(n)"_mclk2_sel",			\
>  		IMX8MP_CLK_AUDIOMIX_SAI##n##_MCLK2_SEL, {},		\
>  		clk_imx8mp_audiomix_sai_mclk2_parents,			\
>  		ARRAY_SIZE(clk_imx8mp_audiomix_sai_mclk2_parents),	\
> -		SAI_MCLK_SEL(n), 4, 1					\
> +		SAI##n##_MCLK_SEL, 4, 1					\
>  	}, {								\
>  		"sai"__stringify(n)"_ipg_cg",				\
>  		IMX8MP_CLK_AUDIOMIX_SAI##n##_IPG,			\
> -- 
> 2.34.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
  2024-02-23 10:15 ` Shengjiu Wang
@ 2024-02-26  9:16   ` Abel Vesa
  -1 siblings, 0 replies; 6+ messages in thread
From: Abel Vesa @ 2024-02-26  9:16 UTC (permalink / raw)
  To: abelvesa, peng.fan, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, linux-imx, shengjiu.wang, marex, m.felsch,
	Shengjiu Wang
  Cc: linux-clk, linux-arm-kernel, linux-kernel


On Fri, 23 Feb 2024 18:15:51 +0800, Shengjiu Wang wrote:
> There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
> control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
> is not match with the usage of CLK_SAIn(n).
> 
> So define SAI##n##_MCLK_SEL separately to fix the issue.
> 
> 
> [...]

Applied, thanks!

[1/1] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
      commit: 13269dc6c70444528f0093585e3559cd2f38850a

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
@ 2024-02-26  9:16   ` Abel Vesa
  0 siblings, 0 replies; 6+ messages in thread
From: Abel Vesa @ 2024-02-26  9:16 UTC (permalink / raw)
  To: abelvesa, peng.fan, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, linux-imx, shengjiu.wang, marex, m.felsch,
	Shengjiu Wang
  Cc: linux-clk, linux-arm-kernel, linux-kernel


On Fri, 23 Feb 2024 18:15:51 +0800, Shengjiu Wang wrote:
> There is SAI1, SAI2, SAI3, SAI5, SAI6, SAI7 existing in this block
> control, the order is discontinuous. The definition of SAI_MCLK_SEL(n)
> is not match with the usage of CLK_SAIn(n).
> 
> So define SAI##n##_MCLK_SEL separately to fix the issue.
> 
> 
> [...]

Applied, thanks!

[1/1] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition
      commit: 13269dc6c70444528f0093585e3559cd2f38850a

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-26  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 10:15 [PATCH] clk: imx: imx8mp: Fix SAI_MCLK_SEL definition Shengjiu Wang
2024-02-23 10:15 ` Shengjiu Wang
2024-02-26  9:04 ` Abel Vesa
2024-02-26  9:04   ` Abel Vesa
2024-02-26  9:16 ` Abel Vesa
2024-02-26  9:16   ` Abel Vesa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.