ARM: hisilicon: hikey: Implement reset_cpu() for hikey.
authorPeter Griffin <peter.griffin@linaro.org>
Wed, 20 Apr 2016 16:14:00 +0000 (17:14 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 25 Apr 2016 19:10:34 +0000 (15:10 -0400)
This allows the reset command to reset the board from
u-boot.

=> reset
resetting ...
INFO:    BL1: 0xf9810000 - 0xf9818000 [size = 32768]
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.1(debug):7fb9b0e
NOTICE:  BL1: Built : 17:06:41, Apr 19 2016

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/hisilicon/hikey/hikey.c

index 3f0a0cc0da8b5edf6a0f7247537bb8c60e5e869e..752ee6f9915182fa1ca1ae56e7a992ba66a79978 100644 (file)
@@ -414,8 +414,8 @@ void dram_init_banksize(void)
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 }
 
-/* Use the Watchdog to cause reset */
 void reset_cpu(ulong addr)
 {
-       /* TODO program the watchdog */
+       writel(0x48698284, &ao_sc->stat0);
+       wfi();
 }