]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/armv8/fwcall.c
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
[u-boot] / arch / arm / cpu / armv8 / fwcall.c
index 9efcc5ada9176772895ade3ea36609ba2861fbd7..079e250cbe995d4f09de60f394e3a3d73e7492bf 100644 (file)
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <version.h>
 #include <asm/macro.h>
+#include <asm/psci.h>
 #include <asm/system.h>
 
 /*
@@ -73,3 +74,18 @@ void smc_call(struct pt_regs *args)
                  "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15",
                  "x16", "x17");
 }
+
+void __noreturn psci_system_reset(bool conduit_smc)
+{
+       struct pt_regs regs;
+
+       regs.regs[0] = ARM_PSCI_0_2_FN_SYSTEM_RESET;
+
+       if (conduit_smc)
+               smc_call(&regs);
+       else
+               hvc_call(&regs);
+
+       while (1)
+               ;
+}