clk: clk-ti-sci: Notify AVS driver upon setting clock rate

Notify AVS driver upon setting clock rate so that voltage
is changed accordingly.

Signed-off-by: Keerthy <j-keerthy@ti.com>
This commit is contained in:
Keerthy 2019-10-24 15:00:47 +05:30 committed by Tom Rini
parent 9d233b4e3e
commit e0aa873bc7

View File

@ -13,6 +13,7 @@
#include <errno.h>
#include <clk-uclass.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <k3-avs.h>
/**
* struct ti_sci_clk_data - clock controller information structure
@ -101,6 +102,10 @@ static ulong ti_sci_clk_set_rate(struct clk *clk, ulong rate)
debug("%s(clk=%p, rate=%lu)\n", __func__, clk, rate);
#ifdef CONFIG_K3_AVS0
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);
if (ret)