aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/clk-ti-sci.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2020-01-17 11:57:30 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2020-01-20 10:10:29 +0530
commitea67b26e3fb063aa59584b113f3d7ea71a0db856 (patch)
treef8890e770408811f524d74642c94c2e129f8e114 /drivers/clk/clk-ti-sci.c
parent713a02a2ce46199c83c3cee0bd02f99dadaa4c8a (diff)
downloadu-boot-ea67b26e3fb063aa59584b113f3d7ea71a0db856.zip
u-boot-ea67b26e3fb063aa59584b113f3d7ea71a0db856.tar.gz
u-boot-ea67b26e3fb063aa59584b113f3d7ea71a0db856.tar.bz2
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>
Diffstat (limited to 'drivers/clk/clk-ti-sci.c')
-rw-r--r--drivers/clk/clk-ti-sci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index 478349f..ed1facb 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -106,8 +106,7 @@ static ulong ti_sci_clk_set_rate(struct clk *clk, ulong rate)
k3_avs_notify_freq(clk->id, clk->data, rate);
#endif
- /* Ask for exact frequency by using same value for min/target/max */
- ret = cops->set_freq(sci, clk->id, clk->data, rate, rate, rate);
+ ret = cops->set_freq(sci, clk->id, clk->data, 0, rate, ULONG_MAX);
if (ret)
dev_err(clk->dev, "%s: set_freq failed (%d)\n", __func__, ret);