diff options
author | Tom Rini <trini@konsulko.com> | 2019-04-30 23:21:27 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-01 07:25:51 -0400 |
commit | b4ee6daad7a2604ca9466b2ba48de86cc27d381f (patch) | |
tree | f28b8d6bfeface9e9f188ffc37322c89e9d1fe77 /arch/arm/mach-imx/sip.c | |
parent | a69120a0d7c8d4044cdaceea9eb03913ba4e49c7 (diff) | |
parent | 0d3912fcd41dc2a85891f78e8fc255a379323619 (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.c | 22 |
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(®s); + + *reg1 = regs.regs[1]; + + return regs.regs[0]; +} |