]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sun6i: cpu_reset: Do not return from cpu_reset()
authorHans de Goede <hdegoede@redhat.com>
Sun, 14 Jun 2015 14:53:15 +0000 (16:53 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 22:42:51 +0000 (00:42 +0200)
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>
arch/arm/cpu/armv7/sunxi/board.c

index 4b2494ea376defaeba5b5108170a097cb1be7ea4..8a4770b438656bcd319d58c4f7df0a66867d7af5 100644 (file)
@@ -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
 }