[PATCH] arm: mvebu: Hang if ddr3_init() fails

If ddr3_init() fails then DDR was not initialized and we cannot load and execute U-Boot. We cannot continue, we cannot do anything in this case, so hang.
Signed-off-by: Pali Rohár pali@kernel.org --- arch/arm/mach-mvebu/spl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 3b6bc3897090..f0cf60bb1488 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -345,7 +345,11 @@ void board_init_f(ulong dummy) serdes_phy_config();
/* Setup DDR */ - ddr3_init(); + ret = ddr3_init(); + if (ret) { + debug("ddr3_init() failed: %d\n", ret); + hang(); + } #endif
/* Initialize Auto Voltage Scaling */

On 09.08.21 17:44, Pali Rohár wrote:
If ddr3_init() fails then DDR was not initialized and we cannot load and execute U-Boot. We cannot continue, we cannot do anything in this case, so hang.
Signed-off-by: Pali Rohár pali@kernel.org
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan
arch/arm/mach-mvebu/spl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 3b6bc3897090..f0cf60bb1488 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -345,7 +345,11 @@ void board_init_f(ulong dummy) serdes_phy_config();
/* Setup DDR */
- ddr3_init();
ret = ddr3_init();
if (ret) {
debug("ddr3_init() failed: %d\n", ret);
hang();
} #endif
/* Initialize Auto Voltage Scaling */
Viele Grüße, Stefan

On 09.08.21 17:44, Pali Rohár wrote:
If ddr3_init() fails then DDR was not initialized and we cannot load and execute U-Boot. We cannot continue, we cannot do anything in this case, so hang.
Signed-off-by: Pali Rohár pali@kernel.org
Applied to u-boot-marvell/master
Thanks, Stefan
arch/arm/mach-mvebu/spl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index 3b6bc3897090..f0cf60bb1488 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -345,7 +345,11 @@ void board_init_f(ulong dummy) serdes_phy_config();
/* Setup DDR */
- ddr3_init();
ret = ddr3_init();
if (ret) {
debug("ddr3_init() failed: %d\n", ret);
hang();
} #endif
/* Initialize Auto Voltage Scaling */
Viele Grüße, Stefan
participants (2)
-
Pali Rohár
-
Stefan Roese