From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Taniya Das <quic_tdas@quicinc.com>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/5] clk: qcom: lpassaudiocc-sc7280: Add support to skip PLL configuration
Date: Tue, 23 Apr 2024 14:35:14 +0200 [thread overview]
Message-ID: <c1d07eff-4832-47d9-8598-aa6709b465ff@linaro.org> (raw)
In-Reply-To: <20240208062836.19767-3-quic_tdas@quicinc.com>
On 2/8/24 07:28, Taniya Das wrote:
> The PLL configuration needs to be skipped when remoteproc brings the
> LPASS out of reset.
>
> Also update the lpassaudio_cc_reset regmap name and max register to handle
> the regmap conflict warning between lpassaudio_cc_reset and lpassaudio_cc.
>
> Fixes: a9dd26639d05 ("clk: qcom: lpass: Add support for LPASS clock controller for SC7280")
> Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
> ---
> drivers/clk/qcom/lpassaudiocc-sc7280.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/clk/qcom/lpassaudiocc-sc7280.c b/drivers/clk/qcom/lpassaudiocc-sc7280.c
> index c43d0b1af7f7..2619a8ced9d5 100644
> --- a/drivers/clk/qcom/lpassaudiocc-sc7280.c
> +++ b/drivers/clk/qcom/lpassaudiocc-sc7280.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0-only
> /*
> * Copyright (c) 2021, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include <linux/clk-provider.h>
> @@ -766,11 +767,13 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
> goto exit;
> }
>
> - clk_zonda_pll_configure(&lpass_audio_cc_pll, regmap, &lpass_audio_cc_pll_config);
> + if (!of_property_read_bool(pdev->dev.of_node, "qcom,adsp-skip-pll")) {
Big no-no.
> + clk_zonda_pll_configure(&lpass_audio_cc_pll, regmap, &lpass_audio_cc_pll_config);
>
> - /* PLL settings */
> - regmap_write(regmap, 0x4, 0x3b);
> - regmap_write(regmap, 0x8, 0xff05);
> + /* PLL settings */
> + regmap_write(regmap, 0x4, 0x3b);
> + regmap_write(regmap, 0x8, 0xff05);
Model these properly and use the abstracted clock (re)configuration functions.
Add the unreachable clocks to `protected-clocks = <>` and make sure that the
aforementioned configure calls check if the PLL was really registered.
> + }
>
> ret = qcom_cc_really_probe(pdev, &lpass_audio_cc_sc7280_desc, regmap);
> if (ret) {
> @@ -778,6 +781,9 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
> goto exit;
> }
>
> + lpass_audio_cc_sc7280_regmap_config.name = "lpassaudio_cc_reset";
Ugh.. are these really not contiguous, or were the register ranges misrepresented from
the start?
> + lpass_audio_cc_sc7280_regmap_config.max_register = 0xc8;
Provide the real size of the block in .max_register instead, unconditionally
Konrad
next prev parent reply other threads:[~2024-04-23 12:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 6:28 [PATCH 0/5] Add updates for clock controllers to support QCM6490 Taniya Das
2024-02-08 6:28 ` [PATCH 1/5] bindings: clock: qcom: Add "qcom,adsp-skip-pll" property Taniya Das
2024-02-08 6:59 ` Dmitry Baryshkov
2024-03-06 6:54 ` Taniya Das
2024-02-08 8:15 ` Krzysztof Kozlowski
2024-03-06 6:53 ` Taniya Das
2024-03-07 7:52 ` Krzysztof Kozlowski
2024-02-08 6:28 ` [PATCH 2/5] clk: qcom: lpassaudiocc-sc7280: Add support to skip PLL configuration Taniya Das
2024-02-08 7:02 ` Dmitry Baryshkov
2024-03-06 6:55 ` Taniya Das
2024-03-06 7:53 ` Dmitry Baryshkov
2024-04-23 12:35 ` Konrad Dybcio [this message]
2024-02-08 6:28 ` [PATCH 3/5] clk: qcom: sc7280: Update the transition delay for GDSC Taniya Das
2024-02-08 7:03 ` Dmitry Baryshkov
2024-03-06 6:54 ` Taniya Das
2024-02-08 6:28 ` [PATCH 4/5] clk: qcom: camcc-sc7280: Add parent dependency to all camera GDSCs Taniya Das
2024-02-08 7:04 ` Dmitry Baryshkov
2024-02-08 6:28 ` [PATCH 5/5] arm64: dts: qcom: Update protected clocks list for qcm6490 variants Taniya Das
2024-02-08 7:14 ` Dmitry Baryshkov
2024-03-06 6:54 ` Taniya Das
2024-03-06 7:54 ` Dmitry Baryshkov
2024-02-09 16:37 ` Bjorn Andersson
2024-03-06 6:54 ` Taniya Das
2024-02-09 16:46 ` Konrad Dybcio
2024-03-06 6:54 ` Taniya Das
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=c1d07eff-4832-47d9-8598-aa6709b465ff@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_tdas@quicinc.com \
--cc=robh+dt@kernel.org \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).