From: Gabor Juhos <j4g8y7@gmail.com>
To: Bryan O'Donoghue <pure.logic@nexus-software.ie>,
Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Taniya Das <quic_tdas@quicinc.com>
Cc: Vinod Koul <vkoul@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] clk: qcom: gcc-qcs404: fix initial rate of GPLL3
Date: Tue, 22 Oct 2024 15:01:56 +0200 [thread overview]
Message-ID: <4c129bca-017c-4123-b9e8-547881b246c8@gmail.com> (raw)
In-Reply-To: <8ec5512b-a8ea-432c-84aa-f920470c056d@nexus-software.ie>
Hi Bryan,
2024. 10. 22. 11:53 keltezéssel, Bryan O'Donoghue írta:
> On 22/10/2024 10:45, Gabor Juhos wrote:
>> The comment before the config of the GPLL3 PLL says that the
>> PLL should run at 930 MHz. In contrary to this, calculating
>> the frequency from the current configuration values by using
>> 19.2 MHz as input frequency defined in 'qcs404.dtsi', it gives
>> 921.6 MHz:
>>
>> $ xo=19200000; l=48; alpha=0x0; alpha_hi=0x0
>> $ echo "$xo * ($((l)) + $(((alpha_hi << 32 | alpha) >> 8)) / 2^32)" | bc -l
>> 921600000.00000000000000000000
>>
>> Set 'alpha_hi' in the configuration to a value used in downstream
>> kernels [1][2] in order to get the correct output rate:
>>
>> $ xo=19200000; l=48; alpha=0x0; alpha_hi=0x70
>> $ echo "$xo * ($((l)) + $(((alpha_hi << 32 | alpha) >> 8)) / 2^32)" | bc -l
>> 930000000.00000000000000000000
>>
>> The change is based on static code analysis, compile tested only.
>>
>> [1] https://git.codelinaro.org/clo/la/kernel/msm-5.4/-/blob/
>> kernel.lnx.5.4.r56-rel/drivers/clk/qcom/gcc-qcs404.c?ref_type=heads#L335
>> [2} https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/blob/
>> kernel.lnx.5.15.r49-rel/drivers/clk/qcom/gcc-qcs404.c?ref_type=heads#L127
>>
>> Cc: stable@vger.kernel.org
>> Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for
>> QCS404")
>> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> It should be possible to test / verify this change with debugcc on qcs404
>
> https://github.com/linux-msm/debugcc/blob/master/qcs404.c
Thank you for the suggestion. Unfortunately, I have no suitable hardware to test
that.
-Gabor
next prev parent reply other threads:[~2024-10-22 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 9:45 [PATCH] clk: qcom: gcc-qcs404: fix initial rate of GPLL3 Gabor Juhos
2024-10-22 9:53 ` Bryan O'Donoghue
2024-10-22 13:01 ` Gabor Juhos [this message]
2024-10-23 4:15 ` Bjorn Andersson
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=4c129bca-017c-4123-b9e8-547881b246c8@gmail.com \
--to=j4g8y7@gmail.com \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pure.logic@nexus-software.ie \
--cc=quic_tdas@quicinc.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vkoul@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