arch/risc-v/src/mfs_start.c: After failed DDR training, reset with WDT

Resetting via WDT leaves more proper reset reason in SYSREG_RESET_SR
than resetting via soft reset.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen 2025-01-29 13:49:04 +02:00 committed by Xiang Xiao
parent f3b0e68124
commit 107b29ee67

View file

@ -37,6 +37,7 @@
#include "mpfs_cache.h"
#include "mpfs_mm_init.h"
#include "mpfs_userspace.h"
#include "hardware/mpfs_wdog.h"
#include "riscv_internal.h"
#include "riscv_percpu.h"
@ -149,7 +150,15 @@ void __mpfs_start(uint64_t mhartid)
/* Reset, but let the progress come out of the uart first */
up_udelay(1000);
up_systemreset();
/* Reset by triggering WDOG */
putreg32(WDOG_FORCE_IMMEDIATE_RESET,
MPFS_WDOG0_LO_BASE + MPFS_WDOG_FORCE_OFFSET);
/* Wait for the reset */
for (; ; );
}
#endif