All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabor Juhos <j4g8y7@gmail.com>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Sricharan Ramabadhran <quic_srichara@quicinc.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>
Cc: 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: apss-ipq-pll: use stromer ops for IPQ5018 to fix boot failure
Date: Thu, 14 Mar 2024 18:24:10 +0100	[thread overview]
Message-ID: <05028fed-2462-4e0b-b686-bbacc23868d9@gmail.com> (raw)
In-Reply-To: <8affb3d8-6210-43e6-8cbb-de28bdcf326a@linaro.org>

2024. 03. 14. 15:00 keltezéssel, Konrad Dybcio írta:

...

>>>> @@ -55,6 +55,24 @@ static struct clk_alpha_pll ipq_pll_huayra = {
>>>>        },
>>>>    };
>>>>    +static struct clk_alpha_pll ipq_pll_stromer = {
>>>> +    .offset = 0x0,
>>>> +    .regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_STROMER_PLUS],
>>>
>>> CLK_ALPHA_PLL_TYPE_STROMER?
>>
>> I admit that using CLK_ALPHA_PLL_TYPE_STROMER would be less confusing. However
>> 'ipq_pll_offsets' array has no entry for that enum, and given the fact that the
>> CLK_ALPHA_PLL_TYPE_STROMER_PLUS entry uses the correct register offsets it makes
>>   little sense to add another entry with the same offsets.
>>
>> Although the 'clk_alpha_pll_regs' in clk-alpha-pll.c has an entry for
>> CLK_ALPHA_PLL_TYPE_STROMER, but the offsets defined there are not 'exactly' the
>> same as the ones defined locally in 'ipq_pll_offsets'. They will be identical if
>> [1] gets accepted but we are not there yet.
> 
> Oh, I completely overlooked that this driver has its own array.. Hm..
> 
> I suppose it would make sense to rename these indices to IPQ_PLL_x to
> help avoid such confusion..


Yes, that would work. To be honest, I have tried that already a few days ago,
but then I had a better idea.

It will be possible to use the entry from 'clk_alpha_pll_regs' for
'ipq_pll_stromer' and for 'ipq_pll_stromer_plus'. To be precise, it would be
usable already but for correctness it needs the series mentioned in my previous
mail.

Then the local entry can be removed from 'ipq_pll_regs' entirely.

Once it is done, the 'ipq_pll_regs' can be converted to be an one-dimensional
array containing the IPQ Huayra specific offsets only. Alternatively the
remaining sole element can be moved into 'clk_alpha_pll_regs' array.

Additionally, the 'pll_type' field in the match data structure is redundant so
that can be removed as well.

This eliminates the need of a separate enum for IPQ specific indices.


Regards,
Gabor


  reply	other threads:[~2024-03-14 17:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 15:06 [PATCH] clk: qcom: apss-ipq-pll: use stromer ops for IPQ5018 to fix boot failure Gabor Juhos
2024-03-13  4:26 ` Kathiravan Thirumoorthy
2024-03-13 18:36 ` Konrad Dybcio
2024-03-14 13:50   ` Gabor Juhos
2024-03-14 14:00     ` Konrad Dybcio
2024-03-14 17:24       ` Gabor Juhos [this message]
2024-03-13 22:57 ` Stephen Boyd
2024-03-14 13:52   ` Gabor Juhos

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=05028fed-2462-4e0b-b686-bbacc23868d9@gmail.com \
    --to=j4g8y7@gmail.com \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.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=mturquette@baylibre.com \
    --cc=quic_gokulsri@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.