diff options
author | Claudiu Beznea <[email protected]> | 2023-09-29 08:38:52 +0300 |
---|---|---|
committer | Geert Uytterhoeven <[email protected]> | 2023-10-05 13:45:19 +0200 |
commit | a2b23159499efd36b2d63b3c4534075d12ddc97a (patch) | |
tree | d78a429ebe40397a0f8ab286f57c7230c7965e86 /scripts/generate_rust_analyzer.py | |
parent | bf51d3b2d048c312764a55d91d67a85ee5535e31 (diff) |
clk: renesas: rzg2l: Fix computation formula
According to the hardware manual for RZ/G2L
(r01uh0914ej0130-rzg2l-rzg2lc.pdf), the computation formula for PLL rate
is as follows:
Fout = ((m + k/65536) * Fin) / (p * 2^s)
and k has values in the range [-32768, 32767]. Dividing k by 65536 with
integer arithmetic gives zero all the time, causing slight differences
b/w what has been set vs. what is displayed. Thus, get rid of this and
decompose the formula before dividing k by 65536.
Fixes: ef3c613ccd68a ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC")
Signed-off-by: Claudiu Beznea <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions