Skip to contentSkip to conversation

armv7R: K3: am654: Trigger panic on DDR init failures

PATCH In review Andreas Dannenberg 3 participants 3 messages Mar 11, 2019 – Apr 12, 2019

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

PATCH 1/1 armv7R: K3: am654: Trigger panic on DDR init failures

When initializing DDR from R5 SPL trigger U-Boot's panic facility rather than simply returning from the board init function as there is little point continuing code execution. Further, as panic implies a board reset, so using it might potentially allow to recover from this error in certain cases such as when the init failure was caused by a temporary glitch of some sorts.

---
 arch/arm/mach-k3/am6_init.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm/mach-k3/am6_init.c +2 -4
index a5553190b4..77cd15f388 100644
@@ -83,10 +83,8 @@ void board_init_f(ulong dummy)
 
 #ifdef CONFIG_K3_AM654_DDRSS
 	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
-	if (ret) {
-		printf("DRAM init failed: %d\n", ret);
-		return;
-	}
+	if (ret)
+		panic("DRAM init failed: %d\n", ret);
 #endif
 }
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 armv7R: K3: am654: Trigger panic on DDR init failures

Quoted 8 lines · Andreas Dannenberg

When initializing DDR from R5 SPL trigger U-Boot's panic facility rather than simply returning from the board init function as there is little point continuing code execution. Further, as panic implies a board reset, so using it might potentially allow to recover from this error in certain cases such as when the init failure was caused by a temporary glitch of some sorts.

Thanks and regards,
Lokesh

#2 lore raw
In reply to Andreas Dannenberg
Quoted 9 lines · Andreas Dannenberg

When initializing DDR from R5 SPL trigger U-Boot's panic facility rather than simply returning from the board init function as there is little point continuing code execution. Further, as panic implies a board reset, so using it might potentially allow to recover from this error in certain cases such as when the init failure was caused by a temporary glitch of some sorts.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190412/6d736d61/attachment.sig>