mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 1/3] clk: initially enable critical clocks
Date: Tue, 25 Feb 2020 09:22:00 +0100	[thread overview]
Message-ID: <20200225082202.10569-1-s.hauer@pengutronix.de> (raw)

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

             reply	other threads:[~2020-02-25  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  8:22 Sascha Hauer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200225082202.10569-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox