Re: [PATCH v3 1/9] clk: bcm: kona: Move CLOCK_COUNT defines into the driver

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

 



On 16/03/2025 20:01, Artur Weber wrote:
> On 10.03.2025 09:40, Krzysztof Kozlowski wrote:
>> On Sat, Mar 08, 2025 at 08:50:39AM +0100, Artur Weber wrote:
>>> CLOCK_COUNT defines for each CCU are stored in the DT binding header.
>>> This is not correct - they are not used by device trees, only internally
>>> by the driver.
>>>
>>> Move the CLOCK_COUNT defines directly into the driver in preparation
>>> for dropping them from the DT binding include.
>>>
>>> Signed-off-by: Artur Weber <aweber.kernel@xxxxxxxxx>
>>> ---
>>>   drivers/clk/bcm/clk-bcm21664.c |  8 ++++++++
>>>   drivers/clk/bcm/clk-bcm281xx.c | 10 ++++++++++
>>>   2 files changed, 18 insertions(+)
>>>
>>> diff --git a/drivers/clk/bcm/clk-bcm21664.c b/drivers/clk/bcm/clk-bcm21664.c
>>> index 520c3aeb4ea9c4a431512c0909f9545c1761d17a..fa6e1649d6f5f459b63026109caea9e2f72e22dd 100644
>>> --- a/drivers/clk/bcm/clk-bcm21664.c
>>> +++ b/drivers/clk/bcm/clk-bcm21664.c
>>> @@ -17,6 +17,8 @@ static struct peri_clk_data frac_1m_data = {
>>>   	.clocks		= CLOCKS("ref_crystal"),
>>>   };
>>>   
>>> +#define BCM21664_ROOT_CCU_CLOCK_COUNT	(BCM21664_ROOT_CCU_FRAC_1M + 1)
>>
>> I hit that wall too, no worries. It might surprise you but 0+1 != 1 :),
> 
> Do you mean that I should specify the clock count directly rather than
> incrementing the last ID? Some other drivers seem to do this the way I
> did here (samsung/clk-exynos*, renesas/r9a06g032-clocks.c).

Just build and test your patches...

Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux