arm64: renesas: Extend stub PSCI implementation to R-Car Gen5
authorHai Pham <hai.pham.ud@renesas.com>
Mon, 27 Oct 2025 17:22:55 +0000 (18:22 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 2 Dec 2025 23:17:15 +0000 (00:17 +0100)
Extend the stub PSCI implementation with support for R-Car Gen5.
R-Car Gen5 uses different register to perform reset, therefore
add a compile-time conditional. This is __secure code, therefore
the runtime SoC detection parts are not available to it, hence
the compile time conditional.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Tweak commit message
arch/arm/mach-renesas/psci-rcar64.c

index 459dd55..22c2ee0 100644 (file)
@@ -32,7 +32,12 @@ u32 __secure psci_version(void)
 
 void __secure __noreturn psci_system_reset(void)
 {
+#if defined(CONFIG_RCAR_GEN5)
+       writel(RST_KCPROT_DIS, RST_RESKCPROT0);
+       writel(0x1, RST_SWSRES1A);
+#else
        writel(RST_SPRES, RST_SRESCR0);
+#endif
 
        while (1)
                ;