]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: Hang if ddr3_init() fails
authorPali Rohár <pali@kernel.org>
Mon, 9 Aug 2021 15:44:35 +0000 (17:44 +0200)
committerStefan Roese <sr@denx.de>
Wed, 11 Aug 2021 06:42:26 +0000 (08:42 +0200)
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>
arch/arm/mach-mvebu/spl.c

index 3b6bc3897090d140c1c6692ba9ae21f64735050e..f0cf60bb1488115b867370e0108bf28f03175d34 100644 (file)
@@ -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 */