diff mbox series

[U-Boot,v3,02/18] clk: clk-ti-sci: Notify AVS driver upon setting clock rate

Message ID 20191024093103.13220-3-j-keerthy@ti.com
State Accepted
Commit e0aa873bc7cd38d802cfdbe186fbbbafb9f6691e
Delegated to: Tom Rini
Headers show
Series misc: Add AVS class 0 support for AM6 | expand

Commit Message

Keerthy Oct. 24, 2019, 9:30 a.m. UTC
Notify AVS driver upon setting clock rate so that voltage
is changed accordingly.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Changes in v3:

  * No change

Changes in v2:

  * No change

 drivers/clk/clk-ti-sci.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Tom Rini Nov. 8, 2019, 3:33 p.m. UTC | #1
On Thu, Oct 24, 2019 at 03:00:47PM +0530, Keerthy wrote:

> Notify AVS driver upon setting clock rate so that voltage
> is changed accordingly.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index c25415d410..478349f22f 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -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)