Skip to contentSkip to conversation

clk: rockchip: rk3576: Fix ACLK_TOP divisor value

PATCH In review Jonas Karlman 3 participants 3 messages Nov 15 – Nov 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: rockchip: rk3576: Fix ACLK_TOP divisor value

Write the calculated divisor to the intended divisor field instead of the parent clock selection field when ACLK_TOP rate is changed.

Fixes 3919310b37ec ("clk: rockchip: Add rk3576 clk support")
---
 drivers/clk/rockchip/clk_rk3576.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/rockchip/clk_rk3576.c +1 -1
index 1a2ac14b63a5..a7e0febfdae8 100644
@@ -306,7 +306,7 @@ static ulong rk3576_top_set_clk(struct rk3576_clk_priv *priv,
 			     ACLK_TOP_SEL_MASK,
 			     (src_clk <<
 			      ACLK_TOP_SEL_SHIFT) |
-			     (src_clk_div - 1) << ACLK_TOP_SEL_SHIFT);
+			     (src_clk_div - 1) << ACLK_TOP_DIV_SHIFT);
 		break;
 	case ACLK_TOP_MID:
 		if (!(priv->cpll_hz % rate)) {
Signature · 1 line
2.56.1
#2 lore raw
In reply to Jonas Karlman
Quoted 2 lines · Jonas Karlman

Write the calculated divisor to the intended divisor field instead of the parent clock selection field when ACLK_TOP rate is changed.

Applied to https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip (u-boot-rockchip-2027.04), thanks!

[1/1] clk: rockchip: rk3576: Fix ACLK_TOP divisor value

      https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/commit/79486455744acd15714203801ee474fc2dafd9e6

Best regards,

Signature · 1 line
Quentin Schulz <[email protected]>