[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fffe0118-6235-446c-a9c5-93f5d1f5ed04@gmail.com>
Date: Sun, 16 Mar 2025 20:01:41 +0100
From: Artur Weber <aweber.kernel@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>, Ray Jui
<rjui@...adcom.com>, Scott Branden <sbranden@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Alex Elder <elder@...nel.org>,
Stanislav Jakubek <stano.jakubek@...il.com>, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v3 1/9] clk: bcm: kona: Move CLOCK_COUNT defines into the
driver
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@...il.com>
>> ---
>> 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).
> so you redefine a define. You need to test this patch bisectability.
I assume renaming the define to not collide with the old name is the way
to go?
Best regards
Artur
Powered by blists - more mailing lists