mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-10 15:03:07 +00:00
767ad64921
Backport recent rk3588 clk updates from upstream,
including one bug fix.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17349
(cherry picked from commit 8ad02ca2f8
)
Link: https://github.com/openwrt/openwrt/pull/17466
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From ad1081a0da2744141d12e94ff816ac91feb871ca Mon Sep 17 00:00:00 2001
|
|
From: Yao Zi <ziyao@disroot.org>
|
|
Date: Thu, 12 Sep 2024 13:32:05 +0000
|
|
Subject: [PATCH] clk: rockchip: fix finding of maximum clock ID
|
|
|
|
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>
|
|
Link: https://lore.kernel.org/r/20240912133204.29089-2-ziyao@disroot.org
|
|
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
|
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
|
|
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
|
|
---
|
|
drivers/clk/rockchip/clk.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/clk/rockchip/clk.c
|
|
+++ b/drivers/clk/rockchip/clk.c
|
|
@@ -439,7 +439,7 @@ unsigned long rockchip_clk_find_max_clk_
|
|
if (list->id > max)
|
|
max = list->id;
|
|
if (list->child && list->child->id > max)
|
|
- max = list->id;
|
|
+ max = list->child->id;
|
|
}
|
|
|
|
return max;
|