linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] clk: imx6ul: fix "failed to get parent" error
@ 2023-03-10 16:45 Oleksij Rempel
  2023-03-10 20:00 ` Stefan Wahren
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Oleksij Rempel @ 2023-03-10 16:45 UTC (permalink / raw)
  To: Abel Vesa, Michael Turquette, Stephen Boyd, Shawn Guo,
	Sascha Hauer
  Cc: Oleksij Rempel, kernel, linux-kernel, Peng Fan, Fabio Estevam,
	NXP Linux Team, linux-clk, linux-arm-kernel

On some configuration we may get following error:
[    0.000000] imx:clk-gpr-mux: failed to get parent (-EINVAL)

This happens if selector is configured to not supported value. To avoid
this warnings add dummy parents for not supported values.

Fixes: 4e197ee880c2 ("clk: imx6ul: add ethernet refclock mux support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/clk/imx/clk-imx6ul.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c
index 2836adb817b7..e3696a88b5a3 100644
--- a/drivers/clk/imx/clk-imx6ul.c
+++ b/drivers/clk/imx/clk-imx6ul.c
@@ -95,14 +95,16 @@ static const struct clk_div_table video_div_table[] = {
 	{ }
 };
 
-static const char * enet1_ref_sels[] = { "enet1_ref_125m", "enet1_ref_pad", };
+static const char * enet1_ref_sels[] = { "enet1_ref_125m", "enet1_ref_pad", "dummy", "dummy"};
 static const u32 enet1_ref_sels_table[] = { IMX6UL_GPR1_ENET1_TX_CLK_DIR,
-					    IMX6UL_GPR1_ENET1_CLK_SEL };
+					    IMX6UL_GPR1_ENET1_CLK_SEL, 0,
+					    IMX6UL_GPR1_ENET1_TX_CLK_DIR | IMX6UL_GPR1_ENET1_CLK_SEL };
 static const u32 enet1_ref_sels_table_mask = IMX6UL_GPR1_ENET1_TX_CLK_DIR |
 					     IMX6UL_GPR1_ENET1_CLK_SEL;
-static const char * enet2_ref_sels[] = { "enet2_ref_125m", "enet2_ref_pad", };
+static const char * enet2_ref_sels[] = { "enet2_ref_125m", "enet2_ref_pad", "dummy", "dummy"};
 static const u32 enet2_ref_sels_table[] = { IMX6UL_GPR1_ENET2_TX_CLK_DIR,
-					    IMX6UL_GPR1_ENET2_CLK_SEL };
+					    IMX6UL_GPR1_ENET2_CLK_SEL, 0,
+					    IMX6UL_GPR1_ENET2_TX_CLK_DIR | IMX6UL_GPR1_ENET2_CLK_SEL };
 static const u32 enet2_ref_sels_table_mask = IMX6UL_GPR1_ENET2_TX_CLK_DIR |
 					     IMX6UL_GPR1_ENET2_CLK_SEL;
 
-- 
2.30.2


_______________________________________________
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] 4+ messages in thread

* Re: [PATCH v1] clk: imx6ul: fix "failed to get parent" error
  2023-03-10 16:45 [PATCH v1] clk: imx6ul: fix "failed to get parent" error Oleksij Rempel
@ 2023-03-10 20:00 ` Stefan Wahren
  2023-03-12 12:57 ` Peng Fan
  2023-03-20 21:25 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2023-03-10 20:00 UTC (permalink / raw)
  To: Oleksij Rempel, Abel Vesa, Michael Turquette, Stephen Boyd,
	Shawn Guo, Sascha Hauer
  Cc: kernel, linux-kernel, Peng Fan, Fabio Estevam, NXP Linux Team,
	linux-clk, linux-arm-kernel

Am 10.03.23 um 17:45 schrieb Oleksij Rempel:
> On some configuration we may get following error:
> [    0.000000] imx:clk-gpr-mux: failed to get parent (-EINVAL)
>
> This happens if selector is configured to not supported value. To avoid
> this warnings add dummy parents for not supported values.
>
> Fixes: 4e197ee880c2 ("clk: imx6ul: add ethernet refclock mux support")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>


_______________________________________________
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] 4+ messages in thread

* RE: [PATCH v1] clk: imx6ul: fix "failed to get parent" error
  2023-03-10 16:45 [PATCH v1] clk: imx6ul: fix "failed to get parent" error Oleksij Rempel
  2023-03-10 20:00 ` Stefan Wahren
@ 2023-03-12 12:57 ` Peng Fan
  2023-03-20 21:25 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2023-03-12 12:57 UTC (permalink / raw)
  To: Oleksij Rempel, Abel Vesa, Michael Turquette, Stephen Boyd,
	Shawn Guo, Sascha Hauer
  Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	Fabio Estevam, dl-linux-imx, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org

> Subject: [PATCH v1] clk: imx6ul: fix "failed to get parent" error
> 
> On some configuration we may get following error:
> [    0.000000] imx:clk-gpr-mux: failed to get parent (-EINVAL)
> 
> This happens if selector is configured to not supported value. To avoid this
> warnings add dummy parents for not supported values.
> 
> Fixes: 4e197ee880c2 ("clk: imx6ul: add ethernet refclock mux support")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
[Peng Fan] 

Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/clk/imx/clk-imx6ul.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c index
> 2836adb817b7..e3696a88b5a3 100644
> --- a/drivers/clk/imx/clk-imx6ul.c
> +++ b/drivers/clk/imx/clk-imx6ul.c
> @@ -95,14 +95,16 @@ static const struct clk_div_table video_div_table[] = {
>  	{ }
>  };
> 
> -static const char * enet1_ref_sels[] = { "enet1_ref_125m",
> "enet1_ref_pad", };
> +static const char * enet1_ref_sels[] = { "enet1_ref_125m",
> +"enet1_ref_pad", "dummy", "dummy"};
>  static const u32 enet1_ref_sels_table[] =
> { IMX6UL_GPR1_ENET1_TX_CLK_DIR,
> -					    IMX6UL_GPR1_ENET1_CLK_SEL };
> +					    IMX6UL_GPR1_ENET1_CLK_SEL, 0,
> +
> IMX6UL_GPR1_ENET1_TX_CLK_DIR | IMX6UL_GPR1_ENET1_CLK_SEL };
>  static const u32 enet1_ref_sels_table_mask =
> IMX6UL_GPR1_ENET1_TX_CLK_DIR |
>  					     IMX6UL_GPR1_ENET1_CLK_SEL;
> -static const char * enet2_ref_sels[] = { "enet2_ref_125m",
> "enet2_ref_pad", };
> +static const char * enet2_ref_sels[] = { "enet2_ref_125m",
> +"enet2_ref_pad", "dummy", "dummy"};
>  static const u32 enet2_ref_sels_table[] =
> { IMX6UL_GPR1_ENET2_TX_CLK_DIR,
> -					    IMX6UL_GPR1_ENET2_CLK_SEL };
> +					    IMX6UL_GPR1_ENET2_CLK_SEL, 0,
> +
> IMX6UL_GPR1_ENET2_TX_CLK_DIR | IMX6UL_GPR1_ENET2_CLK_SEL };
>  static const u32 enet2_ref_sels_table_mask =
> IMX6UL_GPR1_ENET2_TX_CLK_DIR |
>  					     IMX6UL_GPR1_ENET2_CLK_SEL;
> 
> --
> 2.30.2


_______________________________________________
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] 4+ messages in thread

* Re: [PATCH v1] clk: imx6ul: fix "failed to get parent" error
  2023-03-10 16:45 [PATCH v1] clk: imx6ul: fix "failed to get parent" error Oleksij Rempel
  2023-03-10 20:00 ` Stefan Wahren
  2023-03-12 12:57 ` Peng Fan
@ 2023-03-20 21:25 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2023-03-20 21:25 UTC (permalink / raw)
  To: Abel Vesa, Michael Turquette, Oleksij Rempel, Sascha Hauer,
	Shawn Guo
  Cc: Oleksij Rempel, kernel, linux-kernel, Peng Fan, Fabio Estevam,
	NXP Linux Team, linux-clk, linux-arm-kernel

Quoting Oleksij Rempel (2023-03-10 08:45:23)
> On some configuration we may get following error:
> [    0.000000] imx:clk-gpr-mux: failed to get parent (-EINVAL)
> 
> This happens if selector is configured to not supported value. To avoid
> this warnings add dummy parents for not supported values.
> 
> Fixes: 4e197ee880c2 ("clk: imx6ul: add ethernet refclock mux support")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---

Applied to clk-fixes

_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2023-03-20 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 16:45 [PATCH v1] clk: imx6ul: fix "failed to get parent" error Oleksij Rempel
2023-03-10 20:00 ` Stefan Wahren
2023-03-12 12:57 ` Peng Fan
2023-03-20 21:25 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).