[PATCH v1 39/54] ARM: psci: client: register runtime service restart handler

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Dec 18 02:37:59 PST 2025


Like done previously for poweroff, also register a runtime handler for
restarting the board.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 arch/arm/cpu/psci-client.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/cpu/psci-client.c b/arch/arm/cpu/psci-client.c
index 17b021898884..f53181d18473 100644
--- a/arch/arm/cpu/psci-client.c
+++ b/arch/arm/cpu/psci-client.c
@@ -47,6 +47,12 @@ static void __noreturn __efi_runtime rt_psci_poweroff(unsigned long flags)
 	__hang();
 }
 
+static void __noreturn __efi_runtime rt_psci_restart(unsigned long flags)
+{
+	psci_invoke_fn(ARM_PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
+	__hang();
+}
+
 static u32 version;
 int psci_get_version(void)
 {
@@ -184,6 +190,7 @@ static int __init psci_probe(struct device *dev)
 
 	restart.name = "psci";
 	restart.restart = psci_restart;
+	restart.rt_restart = rt_psci_restart;
 	restart.priority = 400;
 
 	ret = restart_handler_register(&restart);
-- 
2.47.3




More information about the barebox mailing list