mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] clk: initially enable critical clocks
@ 2020-02-25  8:22 Sascha Hauer
  2020-02-25  8:22 ` [PATCH 2/3] clk: Do not let the enable count of critical clocks go below 1 Sascha Hauer
  2020-02-25  8:22 ` [PATCH 3/3] clk: print more consistent clock states Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2020-02-25  8:22 UTC (permalink / raw)
  To: Barebox List

Critical clocks have to be enabled initially. We have to do this not
only to enable the clock itself, but also to make sure its parents
stay enabled and also to correctly enable the new parents during
reparenting of the clock.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/clk/clk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ea3304bc7c..05bc21a6d4 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -282,6 +282,9 @@ int clk_register(struct clk *clk)
 
 	list_add_tail(&clk->list, &clks);
 
+	if (clk->flags & CLK_IS_CRITICAL)
+		clk_enable(clk);
+
 	return 0;
 }
 
-- 
2.25.0


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

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

end of thread, other threads:[~2020-02-25  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25  8:22 [PATCH 1/3] clk: initially enable critical clocks Sascha Hauer
2020-02-25  8:22 ` [PATCH 2/3] clk: Do not let the enable count of critical clocks go below 1 Sascha Hauer
2020-02-25  8:22 ` [PATCH 3/3] clk: print more consistent clock states Sascha Hauer

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