mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 12:08:16 +00:00
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:
parent
f3b0e68124
commit
107b29ee67
1 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue