]> git.baikalelectronics.ru Git - uboot.git/commitdiff
ARM: mediatek: mt8516: use PSCI to reset the SoC
authorFabien Parent <fparent@baylibre.com>
Mon, 6 May 2019 14:17:56 +0000 (16:17 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 18 May 2019 16:32:00 +0000 (12:32 -0400)
Instead of using the watchdog, let's use PSCI to perform the reset
of the SoC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
arch/arm/mach-mediatek/mt8516/init.c

index 26a215a8b1af9c3f7378c6278a10aaa92d6e1891..186f6c048acf21d1729a0b2540a15d3e60358da9 100644 (file)
 #include <asm/armv8/mmu.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
-#include <linux/io.h>
 #include <dt-bindings/clock/mt8516-clk.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define WDOG_SWRST             0x10007014
-#define WDOG_SWRST_KEY         0x1209
-
 int dram_init(void)
 {
        int ret;
@@ -87,10 +83,7 @@ int mtk_soc_early_init(void)
 
 void reset_cpu(ulong addr)
 {
-       while (1) {
-               writel(WDOG_SWRST_KEY, WDOG_SWRST);
-               mdelay(5);
-       }
+       psci_system_reset();
 }
 
 int print_cpuinfo(void)