There is no point in continuing booting if the DDR initialization has failed. Panic early to avoid obscure subsequent faults.
Signed-off-by: Michael Tretter <[email protected]> --- arch/arm/mach-socfpga/atf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/atf.c b/arch/arm/mach-socfpga/atf.c index 1fd11c426bc2..6ddfef34632f 100644 --- a/arch/arm/mach-socfpga/atf.c +++ b/arch/arm/mach-socfpga/atf.c @@ -63,6 +63,8 @@ static void __noreturn agilex5_load_and_start_image_via_tfa(void) static void agilex5_el3_init(void) { + int ret; + agilex5_initialize_security_policies(); pr_debug("Security policies initialized\n"); @@ -73,7 +75,9 @@ static void agilex5_el3_init(void) */ if (!IS_ENABLED(CONFIG_DEBUG_LL)) writel(LCR_BKSE, SOCFPGA_UART0_ADDRESS + LCR); - agilex5_ddr_init_full(); + ret = agilex5_ddr_init_full(); + if (ret) + panic("DDR initialization failed\n"); socfpga_agilex5_qspi_init(); -- 2.47.3
