diff mbox series

[U-Boot,v3,07/18] arm: mach-k3: am6_init: Initialize AVS class 0

Message ID 20191024093103.13220-8-j-keerthy@ti.com
State Accepted
Commit 27380cb7e966f779f52d13f394d7aaeed9acbe44
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
Initialize AVS class 0 so that mpu voltage rail is
programmed to the AVS class 0 compensated value.

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

  * No change

Changes in v2:

  * uclass_get_device_by_driver used in place getting the first uclass
    Instance. 

 arch/arm/mach-k3/am6_init.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

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

> Initialize AVS class 0 so that mpu voltage rail is
> programmed to the AVS class 0 compensated value.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>

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

Patch

diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index 0b564f7bd1..99edcd9a24 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -116,6 +116,13 @@  void board_init_f(ulong dummy)
 	/* Perform EEPROM-based board detection */
 	do_board_detect();
 
+#if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
+	ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(k3_avs),
+					  &dev);
+	if (ret)
+		printf("AVS init failed: %d\n", ret);
+#endif
+
 #ifdef CONFIG_K3_AM654_DDRSS
 	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
 	if (ret)