Skip to contentSkip to conversation

arm: mach-k3: am642: Fix reset for workaround errata ID i2331

PATCH In review Andrew Davis 4 participants 4 messages Apr 18, 2024 – Apr 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mach-k3: am642: Fix reset for workaround errata ID i2331

To workaround an issue in AM642 we reset the SoC in early boot. For that we first probed the sysreset driver by calling uclass_get_device(). The ti-sci sysreset driver is now probed during the ti-sci firmware probe. Update this call to probe the firmware driver which will then probe the sysreset driver allowing do_reset() to again function as expected.

Fixes fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")
---
 arch/arm/mach-k3/am642_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-k3/am642_init.c +1 -1
index ddf47ef0a9b..80c3cb3479f 100644
@@ -226,7 +226,7 @@ void board_init_f(ulong dummy)
 	 * The warm reset realigns internal clocks and prevents the lockup from
 	 * happening.
 	 */
-	ret = uclass_first_device_err(UCLASS_SYSRESET, &dev);
+	ret = uclass_get_device_by_driver(UCLASS_FIRMWARE, DM_DRIVER_GET(ti_sci), &dev);
 	if (ret)
 		printf("\n%s:uclass device error [%d]\n",__func__,ret);
 
Signature · 1 line
2.39.2
Tested-by on v1 1/1
#1 lore raw

Am 18.04.24 um 19:58 schrieb Andrew Davis:

Quoted 9 lines

To workaround an issue in AM642 we reset the SoC in early boot. For that we first probed the sysreset driver by calling uclass_get_device(). The ti-sci sysreset driver is now probed during the ti-sci firmware probe. Update this call to probe the firmware driver which will then probe the sysreset driver allowing do_reset() to again function as expected.

Fixes fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")

on phycore-am64x

Quoted 17 lines
---
  arch/arm/mach-k3/am642_init.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-k3/am642_init.c +1 -1
index ddf47ef0a9b..80c3cb3479f 100644
@@ -226,7 +226,7 @@ void board_init_f(ulong dummy)
  	 * The warm reset realigns internal clocks and prevents the lockup from
  	 * happening.
  	 */
-	ret = uclass_first_device_err(UCLASS_SYSRESET, &dev);
+	ret = uclass_get_device_by_driver(UCLASS_FIRMWARE, DM_DRIVER_GET(ti_sci), &dev);
  	if (ret)
  		printf("\n%s:uclass device error [%d]\n",__func__,ret);
 
Tested-by on v1 1/1
#2 lore raw
In reply to Andrew Davis
Quoted 28 lines · Andrew Davis

To workaround an issue in AM642 we reset the SoC in early boot. For that we first probed the sysreset driver by calling uclass_get_device(). The ti-sci sysreset driver is now probed during the ti-sci firmware probe. Update this call to probe the firmware driver which will then probe the sysreset driver allowing do_reset() to again function as expected.

Fixes fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")
---
 arch/arm/mach-k3/am642_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-k3/am642_init.c +1 -1
index ddf47ef0a9b..80c3cb3479f 100644
@@ -226,7 +226,7 @@ void board_init_f(ulong dummy)
 	 * The warm reset realigns internal clocks and prevents the lockup from
 	 * happening.
 	 */
-	ret = uclass_first_device_err(UCLASS_SYSRESET, &dev);
+	ret = uclass_get_device_by_driver(UCLASS_FIRMWARE, DM_DRIVER_GET(ti_sci), &dev);
 	if (ret)
 		printf("\n%s:uclass device error [%d]\n",__func__,ret);
 
Signature · 1 line
2.39.2

on am64x-evm

#3 lore raw
In reply to Andrew Davis
Quoted 8 lines · Andrew Davis

To workaround an issue in AM642 we reset the SoC in early boot. For that we first probed the sysreset driver by calling uclass_get_device(). The ti-sci sysreset driver is now probed during the ti-sci firmware probe. Update this call to probe the firmware driver which will then probe the sysreset driver allowing do_reset() to again function as expected.

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom