summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv8/fwcall.c
diff options
context:
space:
mode:
authorRajesh Ravi <rajesh.ravi@broadcom.com>2019-11-22 14:50:01 -0800
committerTom Rini <trini@konsulko.com>2020-01-10 14:18:26 -0500
commit41acbc53f4bffc981ca84110ec169d3f181d84ca (patch)
tree34ee4b54e074c83a7f7a74644727feff0fd062c8 /arch/arm/cpu/armv8/fwcall.c
parent0bc4356deae7ff2de2441fc519f395e75bed8923 (diff)
downloadu-boot-41acbc53f4bffc981ca84110ec169d3f181d84ca.tar.gz
arm: cpu: armv8: add support for arm psci reset2.
Current U-Boot has only support for psci reset. Adding support for arm psci reset2 allows passing of reset level and other platform sepcific parameters like strap settings to lowlevel psci implementation. Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com> Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Diffstat (limited to 'arch/arm/cpu/armv8/fwcall.c')
-rw-r--r--arch/arm/cpu/armv8/fwcall.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fwcall.c b/arch/arm/cpu/armv8/fwcall.c
index b0aca1b72a..cbd35b7f4a 100644
--- a/arch/arm/cpu/armv8/fwcall.c
+++ b/arch/arm/cpu/armv8/fwcall.c
@@ -98,6 +98,22 @@ void __noreturn psci_system_reset(void)
;
}
+void __noreturn psci_system_reset2(u32 reset_level, u32 cookie)
+{
+ struct pt_regs regs;
+
+ regs.regs[0] = ARM_PSCI_0_2_FN64_SYSTEM_RESET2;
+ regs.regs[1] = PSCI_RESET2_TYPE_VENDOR | reset_level;
+ regs.regs[2] = cookie;
+ if (use_smc_for_psci)
+ smc_call(&regs);
+ else
+ hvc_call(&regs);
+
+ while (1)
+ ;
+}
+
void __noreturn psci_system_off(void)
{
struct pt_regs regs;