mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-01 11:22:08 +00:00
sunxi: Fix reset hang on sun5i
Do the same as the Linux kernel does, this fixes the SoC hanging on reset about 50% of the time. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
This commit is contained in:
parent
2428920835
commit
ae5de5a19d
1 changed files with 5 additions and 1 deletions
|
@ -77,7 +77,11 @@ void reset_cpu(ulong addr)
|
|||
/* Set the watchdog for its shortest interval (.5s) and wait */
|
||||
writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
|
||||
writel(WDT_CTRL_KEY | WDT_CTRL_RESTART, &wdog->ctl);
|
||||
while (1);
|
||||
|
||||
while (1) {
|
||||
/* sun5i sometimes gets stuck without this */
|
||||
writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
|
||||
}
|
||||
}
|
||||
|
||||
/* do some early init */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue