clk: at91: sam9x60-pll: use DIV_ROUND_CLOSEST_ULL
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Mon, 11 Oct 2021 11:27:11 +0000 (14:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 13:04:21 +0000 (14:04 +0100)
commit26be378079fc335d8ecb2113b58788d141b035df
treefb97045c4dbfc3f0549f5792a003e61ece2e13bb
parentf2886010a8d1a87e4c667f0670839a374ec34a71
clk: at91: sam9x60-pll: use DIV_ROUND_CLOSEST_ULL

[ Upstream commit f12d028b743bb6136da60b17228a1b6162886444 ]

Use DIV_ROUND_CLOSEST_ULL() to avoid any inconsistency b/w the rate
computed in sam9x60_frac_pll_recalc_rate() and the one computed in
sam9x60_frac_pll_compute_mul_frac().

Fixes: 43b1bb4a9b3e1 ("clk: at91: clk-sam9x60-pll: re-factor to support plls with multiple outputs")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20211011112719.3951784-8-claudiu.beznea@microchip.com
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/at91/clk-sam9x60-pll.c