Re: [PATCH] clk: qcom: apss-ipq-pll: use stromer ops for IPQ5018 to fix boot failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux