linux-stable/drivers/clk/at91
Codrin Ciubotariu b79bc9f277 clk: at91: generated: consider range when calculating best rate
[ Upstream commit d0031e6fbe ]

clk_generated_best_diff() helps in finding the parent and the divisor to
compute a rate closest to the required one. However, it doesn't take into
account the request's range for the new rate. Make sure the new rate
is within the required range.

Fixes: 8a8f4bf0c4 ("clk: at91: clk-generated: create function to find best_diff")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20220413071318.244912-1-codrin.ciubotariu@microchip.com
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 08:41:20 +02:00
..
clk-audio-pll.c clk: at91: audio-pll: fix audio pmc type 2019-12-01 09:13:32 +01:00
clk-generated.c clk: at91: generated: consider range when calculating best rate 2022-05-25 08:41:20 +02:00
clk-h32mx.c
clk-main.c clk: at91: clk-main: update key before writing AT91_CKGR_MOR 2020-10-29 09:07:11 +01:00
clk-master.c
clk-peripheral.c clk: at91: Add sama5d2 suspend/resume 2017-06-29 18:47:35 -07:00
clk-pll.c clk: at91: Fix division by zero in PLL recalc_rate() 2018-11-21 09:24:07 +01:00
clk-plldiv.c
clk-programmable.c clk: at91: Fix a return value in case of error 2016-10-20 16:37:56 -07:00
clk-slow.c
clk-smd.c
clk-system.c
clk-usb.c clk: at91: usb: continue if clk_hw_round_rate() return zero 2020-04-24 08:01:17 +02:00
clk-utmi.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmc.c clk: at91: pmc: Wait for clocks when resuming 2018-03-24 11:01:28 +01:00
pmc.h clk: at91: Add sama5d2 suspend/resume 2017-06-29 18:47:35 -07:00
sckc.c clk: at91: avoid sleeping early 2019-12-05 15:36:52 +01:00