From: Stephan Gerhold <stephan@gerhold.net>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
Andy Gross <agross@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Marijn Suijten <marijn.suijten@somainline.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] clk: qcom: gcc-msm8996: Use read-only RCG ops for RPM bus clocks
Date: Mon, 12 Jun 2023 12:17:53 +0200 [thread overview]
Message-ID: <ZIbw0dEdFNFcC0Hr@gerhold.net> (raw)
In-Reply-To: <20230612-topic-rcg2_ro-v1-2-e7d824aeb628@linaro.org>
On Mon, Jun 12, 2023 at 11:22:48AM +0200, Konrad Dybcio wrote:
> The config/periph/system NoC clocks are wholly controlled by the
> RPM firmware and Linux should never ever alter their configuration.
>
> Switch them over to read-only ops to avoid that.
>
> Fixes: b1e010c0730a ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/clk/qcom/gcc-msm8996.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-msm8996.c b/drivers/clk/qcom/gcc-msm8996.c
> index 5e44d1bcca9e..588e3b67657a 100644
> --- a/drivers/clk/qcom/gcc-msm8996.c
> +++ b/drivers/clk/qcom/gcc-msm8996.c
> @@ -264,7 +264,7 @@ static struct clk_rcg2 system_noc_clk_src = {
> .name = "system_noc_clk_src",
> .parent_data = gcc_xo_gpll0_gpll0_early_div,
> .num_parents = ARRAY_SIZE(gcc_xo_gpll0_gpll0_early_div),
> - .ops = &clk_rcg2_ops,
> + .ops = &clk_rcg2_ro_ops,
> },
> };
>
> @@ -284,7 +284,7 @@ static struct clk_rcg2 config_noc_clk_src = {
> .name = "config_noc_clk_src",
> .parent_data = gcc_xo_gpll0,
> .num_parents = ARRAY_SIZE(gcc_xo_gpll0),
> - .ops = &clk_rcg2_ops,
> + .ops = &clk_rcg2_ro_ops,
> },
> };
>
> @@ -306,7 +306,7 @@ static struct clk_rcg2 periph_noc_clk_src = {
> .name = "periph_noc_clk_src",
> .parent_data = gcc_xo_gpll0,
> .num_parents = ARRAY_SIZE(gcc_xo_gpll0),
> - .ops = &clk_rcg2_ops,
> + .ops = &clk_rcg2_ro_ops,
> },
> };
>
If the rcg is read-only then it shouldn't need a .freq_tbl (the
.recalc_rate() works without it). These clocks have one for some reason.
Maybe we should also set .flags = CLK_GET_RATE_NOCACHE to ensure that
clk_get_rate() doesn't return some stale value? Although I'm not sure if
it's enough to set it here or if it would need to be set on all child
clocks as well.
Thanks,
Stephan
next prev parent reply other threads:[~2023-06-12 10:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 9:22 [PATCH 0/2] Add read-only RCG2 ops Konrad Dybcio
2023-06-12 9:22 ` [PATCH 1/2] clk: qcom: rcg2: Introduce " Konrad Dybcio
2023-06-12 9:22 ` [PATCH 2/2] clk: qcom: gcc-msm8996: Use read-only RCG ops for RPM bus clocks Konrad Dybcio
2023-06-12 10:17 ` Stephan Gerhold [this message]
2023-06-12 11:46 ` Konrad Dybcio
2023-06-12 12:23 ` Stephan Gerhold
2023-06-12 12:25 ` Konrad Dybcio
2023-06-13 17:56 ` Bjorn Andersson
2023-06-13 17:54 ` Konrad Dybcio
2023-07-31 11:01 ` Konrad Dybcio
2023-08-24 10:27 ` Konrad Dybcio
2023-08-24 11:32 ` Dmitry Baryshkov
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=ZIbw0dEdFNFcC0Hr@gerhold.net \
--to=stephan@gerhold.net \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=mturquette@baylibre.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