summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-06-14 16:53:15 +0200
committerHans de Goede <hdegoede@redhat.com>2015-06-17 15:22:47 +0200
commitfc175434f97d5db518fb6e9a9bfec85e6c166603 (patch)
treedbefcc2b2985e3fda58e2c4d220b0686a03ab32e
parent998b8ab3f61ba3a907a5694cedf81f4cf10b0b5a (diff)
downloadu-boot-imx-fc175434f97d5db518fb6e9a9bfec85e6c166603.zip
u-boot-imx-fc175434f97d5db518fb6e9a9bfec85e6c166603.tar.gz
u-boot-imx-fc175434f97d5db518fb6e9a9bfec85e6c166603.tar.bz2
sun6i: cpu_reset: Do not return from cpu_reset()
Currently on sun6i after a "reset" the prompt returns and the user can even type stuff until the watchdog triggers and does the actual reset. This is somewhat unexpected behavior for the "reset" command, this commit adds an endless loop to wait for the watchdog to trigger so that we do not return to the prompt. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
-rw-r--r--arch/arm/cpu/armv7/sunxi/board.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 4b2494e..8a4770b 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -202,6 +202,7 @@ void reset_cpu(ulong addr)
writel(WDT_CFG_RESET, &wdog->cfg);
writel(WDT_MODE_EN, &wdog->mode);
writel(WDT_CTRL_KEY | WDT_CTRL_RESTART, &wdog->ctl);
+ while (1) { }
#endif
}