diff mbox series

[06/13] clk: samsung: exynos7885: Update CLKS_NR_FSYS after bindings fix

Message ID 20240804215458.404085-7-virag.david003@gmail.com (mailing list archive)
State New
Headers show
Series Add USB support to Exynos7885 | expand

Commit Message

David Virag Aug. 4, 2024, 9:53 p.m. UTC
Update CLKS_NR_FSYS to the proper value after a fix in DT bindings.
This should always be the last clock in a CMU + 1.

Signed-off-by: David Virag <virag.david003@gmail.com>
---
 drivers/clk/samsung/clk-exynos7885.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Aug. 5, 2024, 5:49 a.m. UTC | #1
On 04/08/2024 23:53, David Virag wrote:
> Update CLKS_NR_FSYS to the proper value after a fix in DT bindings.
> This should always be the last clock in a CMU + 1.
> 
> Signed-off-by: David Virag <virag.david003@gmail.com>
> ---
>  drivers/clk/samsung/clk-exynos7885.c | 2 +-

This needs fixes and Cc-stable tag, same as the binding.

Best regards,
Krzysztof
David Virag Aug. 5, 2024, 12:44 p.m. UTC | #2
Hi Krzysztof,

On Mon, 2024-08-05 at 07:49 +0200, Krzysztof Kozlowski wrote:
> On 04/08/2024 23:53, David Virag wrote:
> > Update CLKS_NR_FSYS to the proper value after a fix in DT bindings.
> > This should always be the last clock in a CMU + 1.
> > 
> > Signed-off-by: David Virag <virag.david003@gmail.com>
> > ---
> >  drivers/clk/samsung/clk-exynos7885.c | 2 +-
> 
> This needs fixes and Cc-stable tag, same as the binding.

Would it fix ef4923c8e052 ("clk: samsung: exynos7885: do not define number of clocks in bindings")?
Or would it fix cd268e309c29 ("dt-bindings: clock: Add bindings for Exynos7885 CMU_FSYS")?

I'm guessing the former, but technically the latter introduced
the problem and the former transferred it to the clk driver.

For kernel 6.1, this fix wouldn't work, as we'd need a fix in the
dt-bindings instead (perhaps the dt-bindings fix should include
this fix there).

How would this work?

> 
> Best regards,
> Krzysztof
> 

Best regards,
David
Krzysztof Kozlowski Aug. 5, 2024, 1:38 p.m. UTC | #3
On 05/08/2024 14:44, David Virag wrote:
> Hi Krzysztof,
> 
> On Mon, 2024-08-05 at 07:49 +0200, Krzysztof Kozlowski wrote:
>> On 04/08/2024 23:53, David Virag wrote:
>>> Update CLKS_NR_FSYS to the proper value after a fix in DT bindings.
>>> This should always be the last clock in a CMU + 1.
>>>
>>> Signed-off-by: David Virag <virag.david003@gmail.com>
>>> ---
>>>  drivers/clk/samsung/clk-exynos7885.c | 2 +-
>>
>> This needs fixes and Cc-stable tag, same as the binding.
> 
> Would it fix ef4923c8e052 ("clk: samsung: exynos7885: do not define number of clocks in bindings")?
> Or would it fix cd268e309c29 ("dt-bindings: clock: Add bindings for Exynos7885 CMU_FSYS")?
> 
> I'm guessing the former, but technically the latter introduced
> the problem and the former transferred it to the clk driver.
> 
> For kernel 6.1, this fix wouldn't work, as we'd need a fix in the
> dt-bindings instead (perhaps the dt-bindings fix should include
> this fix there).
> 
> How would this work?

I would say this fixes the latter - bindings commit which introduced
duplicated ID. If your bindings patch is backported, then the number of
IDs do not match anymore number of clocks.

Without your bindings fix, everything matches even though it is not
technically correct.

The bindings fix also needs Cc-stable.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/clk/samsung/clk-exynos7885.c b/drivers/clk/samsung/clk-exynos7885.c
index f7d7427a558b..87387d4cbf48 100644
--- a/drivers/clk/samsung/clk-exynos7885.c
+++ b/drivers/clk/samsung/clk-exynos7885.c
@@ -20,7 +20,7 @@ 
 #define CLKS_NR_TOP			(CLK_GOUT_FSYS_USB30DRD + 1)
 #define CLKS_NR_CORE			(CLK_GOUT_TREX_P_CORE_PCLK_P_CORE + 1)
 #define CLKS_NR_PERI			(CLK_GOUT_WDT1_PCLK + 1)
-#define CLKS_NR_FSYS			(CLK_GOUT_MMC_SDIO_SDCLKIN + 1)
+#define CLKS_NR_FSYS			(CLK_MOUT_FSYS_USB30DRD_USER + 1)
 
 /* ---- CMU_TOP ------------------------------------------------------------- */