Skip to contentSkip to conversation

ARM: mediatek: mt8516: use PSCI to reset the SoC

PATCH New Fabien Parent 2 participants 2 messages May 6, 2019 – May 19, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mediatek: mt8516: use PSCI to reset the SoC

Instead of using the watchdog, let's use PSCI to perform the reset of the SoC.

---
 arch/arm/mach-mediatek/mt8516/init.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/arm/mach-mediatek/mt8516/init.c +1 -8
index 26a215a8b1..186f6c048a 100644
@@ -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)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 ARM: mediatek: mt8516: use PSCI to reset the SoC

Quoted 4 lines · Fabien Parent

Instead of using the watchdog, let's use PSCI to perform the reset of the SoC.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190519/c4ac1d54/attachment.sig>