clk: rockchip: rk3576: Use correct mask for UART1 parent clock
Subsystems (2)
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")
Suggested-by Simon Glass <[email protected]>
Signed-off-by Jonas Karlman <[email protected]>
--- drivers/clk/rockchip/clk_rk3576.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/rockchip/clk_rk3576.c +1 -1
@@ -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
Hi Jonas,
Quoted 6 lines · Jonas Karlman
Use the parent clock selection mask instead of the shift value when reading the parent clock selection to correctly report
SCLK_UART1rate.Fixes 3919310b37ec ("clk: rockchip: Add rk3576 clk support")Suggested-by Simon Glass <[email protected]>Signed-off-by Jonas Karlman <[email protected]>
Reviewed-by Quentin Schulz <[email protected]>
Thanks!
Quentin
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_UART1rate.
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]>