mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] clk: ignore of_device_ensure_probed error in clock lookup
@ 2022-01-16 21:32 Lucas Stach
  2022-01-16 21:32 ` [PATCH 2/3] soc: imx: gpcv2: split PGC domain probe in two passes Lucas Stach
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Lucas Stach @ 2022-01-16 21:32 UTC (permalink / raw)
  To: barebox

For CLK_OF_DECLARE clocks there is no driver that is bound to the device,
so the lookup fails before even trying to find the provider, breaking
the parent_ready() logic used when initializing the declared providers.

Ignore the return code from of_device_ensure_probed to allow the lookup
to proceed as usual. If of_device_ensure_probed the lookup will also fail,
as no provider will be found.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/clk/clk.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 189c9c62df5c..a1d1d7f1a467 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -643,11 +643,9 @@ struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
 {
 	struct of_clk_provider *provider;
 	struct clk *clk = ERR_PTR(-EPROBE_DEFER);
-	int ret;
 
-	ret = of_device_ensure_probed(clkspec->np);
-	if (ret)
-		return ERR_PTR(ret);
+	/* Ignore error, as CLK_OF_DECLARE clocks have no proper driver. */
+	of_device_ensure_probed(clkspec->np);
 
 	/* Check if we have such a provider in our array */
 	list_for_each_entry(provider, &of_clk_providers, link) {
-- 
2.31.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

end of thread, other threads:[~2022-01-18  7:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 21:32 [PATCH 1/3] clk: ignore of_device_ensure_probed error in clock lookup Lucas Stach
2022-01-16 21:32 ` [PATCH 2/3] soc: imx: gpcv2: split PGC domain probe in two passes Lucas Stach
2022-01-16 21:32 ` [PATCH 3/3] ARM: mnt-reform: switch to deep-probe Lucas Stach
2022-01-17  5:12 ` [PATCH 1/3] clk: ignore of_device_ensure_probed error in clock lookup Ahmad Fatoum
2022-01-17  9:16   ` Lucas Stach
2022-01-17 10:20     ` Ahmad Fatoum
2022-01-18  5:39       ` Ahmad Fatoum
2022-01-18  7:34 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox