* [PATCH] clk: rockchip: fix finding of maximum clock ID
@ 2024-09-12 13:32 Yao Zi
2024-09-14 6:48 ` Sebastian Reichel
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Yao Zi @ 2024-09-12 13:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Heiko Stuebner,
Sebastian Reichel
Cc: linux-clk, linux-arm-kernel, linux-rockchip, linux-kernel, Yao Zi
If an ID of a branch's child is greater than current maximum, we should
set new maximum to the child's ID, instead of its parent's.
Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
drivers/clk/rockchip/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index 73d2cbdc716b..0972e9f87470 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
if (list->id > max)
max = list->id;
if (list->child && list->child->id > max)
- max = list->id;
+ max = list->child->id;
}
return max;
--
2.46.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: rockchip: fix finding of maximum clock ID
2024-09-12 13:32 [PATCH] clk: rockchip: fix finding of maximum clock ID Yao Zi
@ 2024-09-14 6:48 ` Sebastian Reichel
2024-09-16 7:31 ` Yao Zi
2024-09-14 9:57 ` Heiko Stübner
2024-10-09 23:07 ` Stephen Boyd
2 siblings, 1 reply; 6+ messages in thread
From: Sebastian Reichel @ 2024-09-14 6:48 UTC (permalink / raw)
To: Heiko Stuebner, Yao Zi
Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-arm-kernel,
linux-rockchip, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]
Hi,
On Thu, Sep 12, 2024 at 01:32:05PM GMT, Yao Zi wrote:
> If an ID of a branch's child is greater than current maximum, we should
> set new maximum to the child's ID, instead of its parent's.
>
> Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
oops, good catch. Note, that the function returns the correct value
for RK3588, since the clocks with the highest IDs are of GATE_LINK
type and do not have their child field set. I have not checked all
the Rockchip SoCs converted for 6.12, so I suggest sending this as
fixes material for 6.12.
Greetings,
-- Sebastian
> drivers/clk/rockchip/clk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
> index 73d2cbdc716b..0972e9f87470 100644
> --- a/drivers/clk/rockchip/clk.c
> +++ b/drivers/clk/rockchip/clk.c
> @@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
> if (list->id > max)
> max = list->id;
> if (list->child && list->child->id > max)
> - max = list->id;
> + max = list->child->id;
> }
>
> return max;
> --
> 2.46.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: rockchip: fix finding of maximum clock ID
2024-09-12 13:32 [PATCH] clk: rockchip: fix finding of maximum clock ID Yao Zi
2024-09-14 6:48 ` Sebastian Reichel
@ 2024-09-14 9:57 ` Heiko Stübner
2024-10-09 23:02 ` Stephen Boyd
2024-10-09 23:07 ` Stephen Boyd
2 siblings, 1 reply; 6+ messages in thread
From: Heiko Stübner @ 2024-09-14 9:57 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Sebastian Reichel, Yao Zi
Cc: linux-clk, linux-arm-kernel, linux-rockchip, linux-kernel, Yao Zi
Am Donnerstag, 12. September 2024, 15:32:05 CEST schrieb Yao Zi:
> If an ID of a branch's child is greater than current maximum, we should
> set new maximum to the child's ID, instead of its parent's.
>
> Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
@Stephen: can you put that on top of the other Rockchip changes for 6.12
please?
Thanks a lot
Heiko
> ---
> drivers/clk/rockchip/clk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
> index 73d2cbdc716b..0972e9f87470 100644
> --- a/drivers/clk/rockchip/clk.c
> +++ b/drivers/clk/rockchip/clk.c
> @@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_id(struct rockchip_clk_branch *list,
> if (list->id > max)
> max = list->id;
> if (list->child && list->child->id > max)
> - max = list->id;
> + max = list->child->id;
> }
>
> return max;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: rockchip: fix finding of maximum clock ID
2024-09-14 6:48 ` Sebastian Reichel
@ 2024-09-16 7:31 ` Yao Zi
0 siblings, 0 replies; 6+ messages in thread
From: Yao Zi @ 2024-09-16 7:31 UTC (permalink / raw)
To: Sebastian Reichel, Heiko Stuebner
Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-arm-kernel,
linux-rockchip, linux-kernel
On Sat, Sep 14, 2024 at 08:48:53AM +0200, Sebastian Reichel wrote:
> Hi,
>
> On Thu, Sep 12, 2024 at 01:32:05PM GMT, Yao Zi wrote:
> > If an ID of a branch's child is greater than current maximum, we should
> > set new maximum to the child's ID, instead of its parent's.
> >
> > Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>
> oops, good catch. Note, that the function returns the correct value
> for RK3588, since the clocks with the highest IDs are of GATE_LINK
> type and do not have their child field set.
yes, but it does hit me when working for rk3528 clock controller unit.
> I have not checked all
> the Rockchip SoCs converted for 6.12, so I suggest sending this as
> fixes material for 6.12.
I have done a rough check and think no code in 6.11 release is affected.
>
> Greetings,
>
> -- Sebastian
Cheers,
Yao Zi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: rockchip: fix finding of maximum clock ID
2024-09-14 9:57 ` Heiko Stübner
@ 2024-10-09 23:02 ` Stephen Boyd
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2024-10-09 23:02 UTC (permalink / raw)
To: Heiko Stübner, Michael Turquette, Sebastian Reichel, Yao Zi
Cc: linux-clk, linux-arm-kernel, linux-rockchip, linux-kernel, Yao Zi
Quoting Heiko Stübner (2024-09-14 02:57:35)
> Am Donnerstag, 12. September 2024, 15:32:05 CEST schrieb Yao Zi:
> > If an ID of a branch's child is greater than current maximum, we should
> > set new maximum to the child's ID, instead of its parent's.
> >
> > Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
> @Stephen: can you put that on top of the other Rockchip changes for 6.12
> please?
>
Sorry I missed this one. I'll put it on clk-fixes.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: rockchip: fix finding of maximum clock ID
2024-09-12 13:32 [PATCH] clk: rockchip: fix finding of maximum clock ID Yao Zi
2024-09-14 6:48 ` Sebastian Reichel
2024-09-14 9:57 ` Heiko Stübner
@ 2024-10-09 23:07 ` Stephen Boyd
2 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2024-10-09 23:07 UTC (permalink / raw)
To: Heiko Stuebner, Michael Turquette, Sebastian Reichel, Yao Zi
Cc: linux-clk, linux-arm-kernel, linux-rockchip, linux-kernel, Yao Zi
Quoting Yao Zi (2024-09-12 06:32:05)
> If an ID of a branch's child is greater than current maximum, we should
> set new maximum to the child's ID, instead of its parent's.
>
> Fixes: 2dc66a5ab2c6 ("clk: rockchip: rk3588: fix CLK_NR_CLKS usage")
> Signed-off-by: Yao Zi <ziyao@disroot.org>
> ---
Applied to clk-fixes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-09 23:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 13:32 [PATCH] clk: rockchip: fix finding of maximum clock ID Yao Zi
2024-09-14 6:48 ` Sebastian Reichel
2024-09-16 7:31 ` Yao Zi
2024-09-14 9:57 ` Heiko Stübner
2024-10-09 23:02 ` Stephen Boyd
2024-10-09 23:07 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).