lib: hang: reset the device if hang in spl

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ica9426db31809dc316ef0cad3e4b2c0ff7985632
This commit is contained in:
Jason Zhu 2020-04-15 15:20:51 +08:00
parent 346c39b341
commit e663d2b596
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,9 @@
#include <common.h>
#include <bootstage.h>
#ifdef CONFIG_SPL_BUILD
__weak void spl_hang_reset(void) {}
#endif
/**
* hang - stop processing by staying in an endless loop
*
@ -26,6 +29,9 @@ void hang(void)
puts("### ERROR ### Please RESET the board ###\n");
#endif
bootstage_error(BOOTSTAGE_ID_NEED_RESET);
#ifdef CONFIG_SPL_BUILD
spl_hang_reset();
#endif
for (;;)
;
}