Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: clocking-wizard: Fix the round rate handling for versal

Fix the `clk_round_rate` implementation for Versal platforms by calling
the Versal-specific divider calculation helper. The existing code used
the generic divider routine, which results in incorrect round rate.

Fixes: 7681f64e6404 ("clk: clocking-wizard: calculate dividers fractional parts")
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Link: https://lore.kernel.org/r/20250625054114.28273-1-shubhrajyoti.datta@amd.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Shubhrajyoti Datta and committed by
Stephen Boyd
7f5e9ca0 264200cc

+1 -1
+1 -1
drivers/clk/xilinx/clk-xlnx-clock-wizard.c
··· 669 669 u32 m, d, o, div, f; 670 670 int err; 671 671 672 - err = clk_wzrd_get_divisors(hw, rate, *prate); 672 + err = clk_wzrd_get_divisors_ver(hw, rate, *prate); 673 673 if (err) 674 674 return err; 675 675