clk: sci-clk: add slack to clk-set-rate passed to firmware
authorLokesh Vutla <lokeshvutla@ti.com>
Fri, 17 Jan 2020 06:27:30 +0000 (11:57 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Mon, 20 Jan 2020 04:40:29 +0000 (10:10 +0530)
commitea67b26e3fb063aa59584b113f3d7ea71a0db856
treef8890e770408811f524d74642c94c2e129f8e114
parent713a02a2ce46199c83c3cee0bd02f99dadaa4c8a
clk: sci-clk: add slack to clk-set-rate passed to firmware

Add slack to the clock frequency parameters passed to firmware within
clk_set_rate. min-freq is changed to 0 and max-rate is changed to
ULONG_MAX. This fixes certain issues with pll clock rounding when the
firmware is not able to set the frequency exactly to the target, the
current implementation fails if the available frequency is even 1Hz off
the target. With the change, the firmware still tries its best to set
the frequency as close as possible to the target.

Reported-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
drivers/clk/clk-ti-sci.c