summaryrefslogtreecommitdiff
path: root/include/linux/xarray.h
diff options
context:
space:
mode:
authorJoey Lu <a0987203069@gmail.com>2026-05-21 09:42:19 +0800
committerBrian Masney <bmasney@redhat.com>2026-06-29 13:27:28 -0400
commit26de5aed72d80bd8aec2583134aca3597c64fda9 (patch)
tree0fa64a49aee0afd5c6be6b06de4e24aae1f0f85b /include/linux/xarray.h
parentb3a2223a7805c7e6759a32a5d6ca574ad07e2710 (diff)
clk: nuvoton: ma35d1: fix PLL_CTL1_FRAC bit field width and fractional calc
PLL_CTL1_FRAC was defined as GENMASK(31, 24), covering only 8 bits. The hardware fractional field occupies bits [31:8] (24 bits), so the mask must be GENMASK(31, 8). The previous fractional-mode calculation used FIELD_MAX(PLL_CTL1_FRAC) as the denominator to obtain 2 decimal places. With the corrected 24-bit mask the old divisor is wrong; replace the arithmetic with a proper 24-bit fixed-point rounding to 3 decimal places using the kernel's DIV_ROUND_CLOSEST_ULL helper: n_frac = n * 1000 + DIV_ROUND_CLOSEST_ULL(x * 1000, 1 << 24) Fixes: 691521a367cf ("clk: nuvoton: Add clock driver for ma35d1 clock controller") Signed-off-by: Joey Lu <a0987203069@gmail.com> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
Diffstat (limited to 'include/linux/xarray.h')
0 files changed, 0 insertions, 0 deletions