diff --git a/arch/risc-v/src/mpfs/mpfs_start.c b/arch/risc-v/src/mpfs/mpfs_start.c index cf739534511..f637e1a4f7c 100755 --- a/arch/risc-v/src/mpfs/mpfs_start.c +++ b/arch/risc-v/src/mpfs/mpfs_start.c @@ -167,7 +167,19 @@ void __mpfs_start(uint64_t mhartid) #endif #ifdef CONFIG_MPFS_DDR_INIT - mpfs_ddr_init(); + if (mpfs_ddr_init() != 0) + { + /* We don't allow booting, ddr training failure will cause random + * behaviour + */ + + showprogress('X'); + + /* Reset, but let the progress come out of the uart first */ + + up_udelay(1000); + up_systemreset(); + } #endif showprogress('B');