Thread (5 messages) 5 messages, 3 authors, 2023-02-18

Re: [PATCH] clk: imx: pll14xx: fix recalc_rate for negative kdiv

From: Stephen Boyd <sboyd@kernel.org>
Date: 2023-02-18 01:44:13
Also in: linux-clk, lkml

Quoting Kevin Groeneveld (2022-12-10 12:38:35)
kdiv is a signed 16 bit value in the DEV_CTL1 register. Commit
53990cf9d5b4 ("clk: imx: pll14xx: consolidate rate calculation") changed
the kdiv variable from a short int to just int. When the value read from
the DIV_CTL1 register is assigned directly to an int the sign of the value
is lost resulting in incorrect results when the value is negative. Adding
a s16 cast to the register value fixes the issue.

Fixes: 53990cf9d5b4 ("clk: imx: pll14xx: consolidate rate calculation")
Signed-off-by: Kevin Groeneveld <redacted>
---
Applied to clk-fixes

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help