aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/sip.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-30 23:21:27 -0400
committerTom Rini <trini@konsulko.com>2019-05-01 07:25:51 -0400
commitb4ee6daad7a2604ca9466b2ba48de86cc27d381f (patch)
treef28b8d6bfeface9e9f188ffc37322c89e9d1fe77 /arch/arm/mach-imx/sip.c
parenta69120a0d7c8d4044cdaceea9eb03913ba4e49c7 (diff)
parent0d3912fcd41dc2a85891f78e8fc255a379323619 (diff)
Merge tag 'u-boot-imx-20190426' of git://git.denx.de/u-boot-imx
Porting to DM and i.MX8 ------------------------ - warp7 to DM - kp_imx53 to DM - Warnings in DT - MX8QM support - colibri-imx6ull to DM - imx7d-pico to DM - ocotp for MX8
Diffstat (limited to 'arch/arm/mach-imx/sip.c')
-rw-r--r--arch/arm/mach-imx/sip.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/sip.c b/arch/arm/mach-imx/sip.c
index 813c2ae5e1..968e7cf309 100644
--- a/arch/arm/mach-imx/sip.c
+++ b/arch/arm/mach-imx/sip.c
@@ -20,3 +20,25 @@ unsigned long call_imx_sip(unsigned long id, unsigned long reg0,
return regs.regs[0];
}
+
+/*
+ * Do an SMC call to return 2 registers by having reg1 passed in by reference
+ */
+unsigned long call_imx_sip_ret2(unsigned long id, unsigned long reg0,
+ unsigned long *reg1, unsigned long reg2,
+ unsigned long reg3)
+{
+ struct pt_regs regs;
+
+ regs.regs[0] = id;
+ regs.regs[1] = reg0;
+ regs.regs[2] = *reg1;
+ regs.regs[3] = reg2;
+ regs.regs[4] = reg3;
+
+ smc_call(&regs);
+
+ *reg1 = regs.regs[1];
+
+ return regs.regs[0];
+}