rockchip: spl: only allow do reset after dm setup
Without this, there is a dead loop path: hang() => spl_hang_reset() => do_reset() => failed to reset => hang()! Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I8553bde97bd45ca63e5a12aca1acfc939301b04f
This commit is contained in:
parent
658285c1fb
commit
5ead1aa09a
|
|
@ -381,8 +381,11 @@ void spl_hang_reset(void)
|
|||
{
|
||||
printf("# Reset the board to bootrom #\n");
|
||||
#if defined(CONFIG_SPL_SYSRESET) && defined(CONFIG_SPL_DRIVERS_MISC_SUPPORT)
|
||||
/* reset is available after dm setup */
|
||||
if (gd->flags & GD_FLG_SPL_EARLY_INIT) {
|
||||
writel(BOOT_BROM_DOWNLOAD, CONFIG_ROCKCHIP_BOOT_MODE_REG);
|
||||
do_reset(NULL, 0, 0, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue