]> git.baikalelectronics.ru Git - kernel.git/commit
clk: keystone: sci-clk: add 10% slack to set_rate
authorTero Kristo <t-kristo@ti.com>
Mon, 7 Sep 2020 08:57:40 +0000 (11:57 +0300)
committerStephen Boyd <sboyd@kernel.org>
Tue, 22 Sep 2020 19:58:52 +0000 (12:58 -0700)
commit128a7b911e2e331eb91bd3f764d1f9532f0eb4be
treed812db563368295091401be1138463048ced1094
parent3220a620585d768d9e1b9e92b64cdf4a499d0208
clk: keystone: sci-clk: add 10% slack to set_rate

Currently, we request exact clock rates from the firmware to be set with
set_rate. Due to some rounding errors and internal functionality of the
firmware itself, this can fail. Thus, add some slack to the set_rate
functionality so that we are always guaranteed to pass. The firmware
always attempts to use frequency as close to the target freq as
possible despite the slack given here.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Link: https://lore.kernel.org/r/20200907085740.1083-4-t-kristo@ti.com
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/keystone/sci-clk.c