From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: sboyd@kernel.org, mturquette@baylibre.com
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de,
Peng Fan <peng.fan@nxp.com>
Subject: [PATCH] clk: not calculate new rate for protected clks
Date: Mon, 31 May 2021 18:39:57 +0800 [thread overview]
Message-ID: <20210531103957.21886-1-peng.fan@oss.nxp.com> (raw)
From: Peng Fan <peng.fan@nxp.com>
If the protect_count of the parent clk is not 0, we not calculate new
rates for parent. Otherwise, the common clk framework may configure
other child clks that is under using.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 65508eb89ec9..8ac121838e13 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2002,7 +2002,7 @@ static struct clk_core *clk_calc_new_rates(struct clk_core *core,
}
if ((core->flags & CLK_SET_RATE_PARENT) && parent &&
- best_parent_rate != parent->rate)
+ best_parent_rate != parent->rate && !clk_core_rate_is_protected(parent))
top = clk_calc_new_rates(parent, best_parent_rate);
out:
--
2.30.0
next reply other threads:[~2021-05-31 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-31 10:39 Peng Fan (OSS) [this message]
2021-07-08 3:01 ` [PATCH] clk: not calculate new rate for protected clks Peng Fan (OSS)
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=20210531103957.21886-1-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=sboyd@kernel.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;
as well as URLs for NNTP newsgroup(s).