Skip to contentSkip to conversation

clk: rockchip: rk3576: Use correct mask for UART1 parent clock

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: Use correct mask for UART1 parent clock

Use the parent clock selection mask instead of the shift value when reading the parent clock selection to correctly report SCLK_UART1 rate.

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 a7e0febfdae8..117bef2eba1e 100644
@@ -1807,7 +1807,7 @@ static ulong rk3576_uart_get_rate(struct rk3576_clk_priv *priv, ulong clk_id)
 		return -ENOENT;
 	}
 	if (clk_id == SCLK_UART1) {
-		src = (con & CLK_UART1_SRC_SEL_SHIFT) >> CLK_UART1_SRC_SEL_SHIFT;
+		src = (con & CLK_UART1_SRC_SEL_MASK) >> CLK_UART1_SRC_SEL_SHIFT;
 		div = (con & CLK_UART1_SRC_DIV_MASK) >> CLK_UART1_SRC_DIV_SHIFT;
 	} else {
 		src = (con & CLK_UART_SEL_MASK) >> CLK_UART_SEL_SHIFT;
Signature · 1 line
2.56.1
#2 lore raw
In reply to Jonas Karlman
Quoted 2 lines · Jonas Karlman

Use the parent clock selection mask instead of the shift value when reading the parent clock selection to correctly report SCLK_UART1 rate.

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: Use correct mask for UART1 parent clock

      https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/commit/40393084b930d7ed5dcecf7952cea06b9006df68

Best regards,

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