Skip to content
Snippets Groups Projects
Commit ae5de5a1 authored by Hans de Goede's avatar Hans de Goede Committed by Ian Campbell
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarIan Campbell <ijc@hellion.org.uk>
parent 24289208
Branches
Tags
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment