diff mbox series

[U-Boot] ARM: mediatek: mt8516: use PSCI to reset the SoC

Message ID 20190506141756.16228-1-fparent@baylibre.com
State Accepted
Commit 47f30aaa36ee3f8f499f5f57a73f66476eb993ec
Delegated to: Tom Rini
Headers show
Series [U-Boot] ARM: mediatek: mt8516: use PSCI to reset the SoC | expand

Commit Message

Fabien Parent May 6, 2019, 2:17 p.m. UTC
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 | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Tom Rini May 19, 2019, 8:45 p.m. UTC | #1
On Mon, May 06, 2019 at 04:17:56PM +0200, Fabien Parent wrote:

> Instead of using the watchdog, let's use PSCI to perform the reset
> of the SoC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 26a215a8b1..186f6c048a 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -14,14 +14,10 @@ 
 #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)