lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8420862d-c292-99aa-3d48-7734a772dab6@linaro.org>
Date:   Mon, 29 May 2023 11:55:53 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>,
        Yassine Oudjana <yassine.oudjana@...il.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc:     Yassine Oudjana <y.oudjana@...tonmail.com>,
        linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] clk: qcom: cbf-msm8996: Add support for MSM8996
 Pro

On 29/05/2023 11:18, Konrad Dybcio wrote:
> 
> 
> On 27.05.2023 11:39, Yassine Oudjana wrote:
>> From: Yassine Oudjana <y.oudjana@...tonmail.com>
>>
>> The CBF PLL on MSM8996 Pro has a /4 post divisor instead of /2. Handle the
>> difference accordingly.
>>
>> Signed-off-by: Yassine Oudjana <y.oudjana@...tonmail.com>
>> ---
>>   drivers/clk/qcom/clk-cbf-8996.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/clk/qcom/clk-cbf-8996.c b/drivers/clk/qcom/clk-cbf-8996.c
>> index cfd567636f4e..ab988e6f1976 100644
>> --- a/drivers/clk/qcom/clk-cbf-8996.c
>> +++ b/drivers/clk/qcom/clk-cbf-8996.c
>> @@ -48,7 +48,7 @@ static const u8 cbf_pll_regs[PLL_OFF_MAX_REGS] = {
>>   	[PLL_OFF_STATUS] = 0x28,
>>   };
>>   
>> -static const struct alpha_pll_config cbfpll_config = {
>> +static struct alpha_pll_config cbfpll_config = {
>>   	.l = 72,
>>   	.config_ctl_val = 0x200d4828,
>>   	.config_ctl_hi_val = 0x006,
>> @@ -137,7 +137,7 @@ static int clk_cbf_8996_mux_determine_rate(struct clk_hw *hw,
>>   {
>>   	struct clk_hw *parent;
>>   
>> -	if (req->rate < (DIV_THRESHOLD / 2))
>> +	if (req->rate < (DIV_THRESHOLD / cbf_pll_postdiv.div))
>>   		return -EINVAL;
>>   
>>   	if (req->rate < DIV_THRESHOLD)
>> @@ -265,6 +265,11 @@ static int qcom_msm8996_cbf_probe(struct platform_device *pdev)
>>   	/* Switch CBF to use the primary PLL */
>>   	regmap_update_bits(regmap, CBF_MUX_OFFSET, CBF_MUX_PARENT_MASK, 0x1);
>>   
>> +	if (of_device_is_compatible(dev->of_node, "qcom,msm8996pro-cbf")) {
> If this was a driver for more than 1.5 SoCs, I'd propose using a
> different mechanism here (match data flags or something), but since
> there aren't (and hopefully won't ever be) more 8996s (automotive etc.
> inherit one of these configurations so that doesn't count), I'm willing
> to say

Fingers crossed for no additional 8996 variants.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>

> Reviewed-by: Konrad Dybcio <konrad.dybcio@...aro.org>



-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ