diff mbox series

board: ti: j721e: Add support for both esm probe

Message ID 20240417043650.3743061-1-u-kumar1@ti.com
State Accepted
Delegated to: Tom Rini
Headers show
Series board: ti: j721e: Add support for both esm probe | expand

Commit Message

Kumar, Udit April 17, 2024, 4:36 a.m. UTC
At present only MCU domain ESM is probed, this means errors
occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn.
MCU ESM accepts SOC_SAFETY_ERRORn signal as Error
event and propagate to MCU_SAFETY_ERRORn.[0]

Therefore adding support to probe both main domain and mcu
domain ESM.

[0]: https://www.ti.com/lit/zip/spruil1
spruil1c.pdf from zip
Figure 12-1244. ESM Modules Overview

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---
 board/ti/j721e/evm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

J, KEERTHY April 17, 2024, 9:15 a.m. UTC | #1
On 4/17/2024 10:06 AM, Udit Kumar wrote:
> At present only MCU domain ESM is probed, this means errors
> occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn.
> MCU ESM accepts SOC_SAFETY_ERRORn signal as Error
> event and propagate to MCU_SAFETY_ERRORn.[0]
> 
> Therefore adding support to probe both main domain and mcu
> domain ESM.

Reviewed-by: Keerthy <j-keerthy@ti.com>

> 
> [0]: https://www.ti.com/lit/zip/spruil1
> spruil1c.pdf from zip
> Figure 12-1244. ESM Modules Overview
> 
> Signed-off-by: Udit Kumar <u-kumar1@ti.com>
> ---
>   board/ti/j721e/evm.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
> index 9dc3ed6dff..539eaf4718 100644
> --- a/board/ti/j721e/evm.c
> +++ b/board/ti/j721e/evm.c
> @@ -465,10 +465,13 @@ void spl_board_init(void)
>   	}
>   
>   	if (IS_ENABLED(CONFIG_ESM_K3)) {
> -		ret = uclass_get_device_by_driver(UCLASS_MISC,
> -						  DM_DRIVER_GET(k3_esm), &dev);
> +		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@700000", &dev);
> +		if (ret)
> +			printf("MISC init for esm@700000 failed: %d\n", ret);
> +
> +		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@40800000", &dev);
>   		if (ret)
> -			printf("ESM init failed: %d\n", ret);
> +			printf("MISC init for esm@40800000 failed: %d\n", ret);
>   	}
>   
>   	if (IS_ENABLED(CONFIG_ESM_PMIC)) {
Tom Rini April 29, 2024, 11:04 p.m. UTC | #2
On Wed, 17 Apr 2024 10:06:50 +0530, Udit Kumar wrote:

> At present only MCU domain ESM is probed, this means errors
> occurred in mcu domain will be propagate to MCU_SAFETY_ERRORn.
> MCU ESM accepts SOC_SAFETY_ERRORn signal as Error
> event and propagate to MCU_SAFETY_ERRORn.[0]
> 
> Therefore adding support to probe both main domain and mcu
> domain ESM.
> 
> [...]

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

Patch

diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 9dc3ed6dff..539eaf4718 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -465,10 +465,13 @@  void spl_board_init(void)
 	}
 
 	if (IS_ENABLED(CONFIG_ESM_K3)) {
-		ret = uclass_get_device_by_driver(UCLASS_MISC,
-						  DM_DRIVER_GET(k3_esm), &dev);
+		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@700000", &dev);
+		if (ret)
+			printf("MISC init for esm@700000 failed: %d\n", ret);
+
+		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@40800000", &dev);
 		if (ret)
-			printf("ESM init failed: %d\n", ret);
+			printf("MISC init for esm@40800000 failed: %d\n", ret);
 	}
 
 	if (IS_ENABLED(CONFIG_ESM_PMIC)) {