All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331
@ 2024-04-18 17:58 Andrew Davis
  2024-04-23 13:52 ` Wadim Egorov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Davis @ 2024-04-18 17:58 UTC (permalink / raw)
  To: Neha Malcom Francis, Vignesh Raghavendra, Nishanth Menon,
	Simon Glass, Tom Rini
  Cc: Jon Humphreys, u-boot, 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.

Reported-by: Jonathan Humphreys <j-humphreys@ti.com>
Fixes: fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")
Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm/mach-k3/am642_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index ddf47ef0a9b..80c3cb3479f 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -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);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331
  2024-04-18 17:58 [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331 Andrew Davis
@ 2024-04-23 13:52 ` Wadim Egorov
  2024-04-25 18:30 ` Kamlesh Gurudasani
  2024-04-29 23:04 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Wadim Egorov @ 2024-04-23 13:52 UTC (permalink / raw)
  To: Andrew Davis, Neha Malcom Francis, Vignesh Raghavendra,
	Nishanth Menon, Simon Glass, Tom Rini
  Cc: Jon Humphreys, u-boot



Am 18.04.24 um 19:58 schrieb 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.
> 
> Reported-by: Jonathan Humphreys <j-humphreys@ti.com>
> Fixes: fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")
> Signed-off-by: Andrew Davis <afd@ti.com>

Tested-by: Wadim Egorov <w.egorov@phytec.de>

on phycore-am64x

> ---
>   arch/arm/mach-k3/am642_init.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
> index ddf47ef0a9b..80c3cb3479f 100644
> --- a/arch/arm/mach-k3/am642_init.c
> +++ b/arch/arm/mach-k3/am642_init.c
> @@ -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);
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331
  2024-04-18 17:58 [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331 Andrew Davis
  2024-04-23 13:52 ` Wadim Egorov
@ 2024-04-25 18:30 ` Kamlesh Gurudasani
  2024-04-29 23:04 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Kamlesh Gurudasani @ 2024-04-25 18:30 UTC (permalink / raw)
  To: Andrew Davis, Neha Malcom Francis, Vignesh Raghavendra,
	Nishanth Menon, Simon Glass, Tom Rini
  Cc: Jon Humphreys, u-boot, Andrew Davis

Andrew Davis <afd@ti.com> writes:

> 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.
>
> Reported-by: Jonathan Humphreys <j-humphreys@ti.com>
> Fixes: fc5d40283483 ("firmware: ti_sci: Bind sysreset driver when enabled")
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  arch/arm/mach-k3/am642_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
> index ddf47ef0a9b..80c3cb3479f 100644
> --- a/arch/arm/mach-k3/am642_init.c
> +++ b/arch/arm/mach-k3/am642_init.c
> @@ -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);
>  
> -- 
> 2.39.2
Tested-by: Kamlesh Gurudasani <kamlesh@ti.com>

on am64x-evm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331
  2024-04-18 17:58 [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331 Andrew Davis
  2024-04-23 13:52 ` Wadim Egorov
  2024-04-25 18:30 ` Kamlesh Gurudasani
@ 2024-04-29 23:04 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2024-04-29 23:04 UTC (permalink / raw)
  To: Neha Malcom Francis, Vignesh Raghavendra, Nishanth Menon,
	Simon Glass, Andrew Davis
  Cc: Jon Humphreys, u-boot

On Thu, 18 Apr 2024 12:58:28 -0500, Andrew Davis wrote:

> 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!

-- 
Tom



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-29 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 17:58 [PATCH] arm: mach-k3: am642: Fix reset for workaround errata ID i2331 Andrew Davis
2024-04-23 13:52 ` Wadim Egorov
2024-04-25 18:30 ` Kamlesh Gurudasani
2024-04-29 23:04 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.