linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: at91: sama5d2: Mark device OF_POPULATED after setup
@ 2021-01-28 10:44 Tudor Ambarus
  2021-01-28 17:01 ` Saravana Kannan
  0 siblings, 1 reply; 10+ messages in thread
From: Tudor Ambarus @ 2021-01-28 10:44 UTC (permalink / raw)
  To: mturquette, sboyd, nicolas.ferre, alexandre.belloni,
	ludovic.desroches, claudiu.beznea, mirq-linux, saravanak
  Cc: gregkh, linux-clk, linux-arm-kernel, linux-kernel, Tudor Ambarus

The sama5d2 requires the clock provider initialized before timers.
We can't use a platform driver for the sama5d2-pmc driver, as the
platform_bus_init() is called later on, after time_init().

As fw_devlink considers only devices, it does not know that the
pmc is ready. Hence probing of devices that depend on it fail:
probe deferral - supplier f0014000.pmc not ready

Fix this by setting the OF_POPULATED flag for the sama5d2_pmc
device node after successful setup. This will make
of_link_to_phandle() ignore the sama5d2_pmc device node as a
dependency, and consumer devices will be probed again.

Fixes: e590474768f1cc04 ("driver core: Set fw_devlink=on by default")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
I'll be out of office, will check the rest of the at91 SoCs
at the begining of next week.

 drivers/clk/at91/sama5d2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
index 9a5cbc7cd55a..5eea2b4a63dd 100644
--- a/drivers/clk/at91/sama5d2.c
+++ b/drivers/clk/at91/sama5d2.c
@@ -367,6 +367,8 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
 
 	of_clk_add_hw_provider(np, of_clk_hw_pmc_get, sama5d2_pmc);
 
+	of_node_set_flag(np, OF_POPULATED);
+
 	return;
 
 err_free:
-- 
2.25.1


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

end of thread, other threads:[~2021-02-10  8:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 10:44 [PATCH] clk: at91: sama5d2: Mark device OF_POPULATED after setup Tudor Ambarus
2021-01-28 17:01 ` Saravana Kannan
2021-02-01 10:54   ` Geert Uytterhoeven
2021-02-01 17:16     ` Saravana Kannan
2021-02-09  7:55   ` Stephen Boyd
2021-02-09  9:11     ` Saravana Kannan
2021-02-09 15:21       ` Tudor.Ambarus
2021-02-09 19:06         ` Saravana Kannan
2021-02-10  8:09           ` Tudor.Ambarus
2021-02-09  9:42     ` Tudor.Ambarus

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).