diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-09 13:10:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-09 13:10:38 -0400 |
commit | 92c4eb7ae3e8fe2c2b3c5b37f882b42282a08e84 (patch) | |
tree | 2ce9a497994386b4f58861107a792fe69b82577e /arch/arm/mach-socfpga/smc_api.c | |
parent | a1e95e3805eacca1162f6049dceb9b1d2726cbf5 (diff) | |
parent | 96fe4f6485e92ed9da464c96c5f536698c5ee66d (diff) |
Merge branch 'v2021.07-rc1' of https://github.com/lftan/u-boot
Diffstat (limited to 'arch/arm/mach-socfpga/smc_api.c')
-rw-r--r-- | arch/arm/mach-socfpga/smc_api.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/smc_api.c b/arch/arm/mach-socfpga/smc_api.c index 085daba162a..8ffc7a472b5 100644 --- a/arch/arm/mach-socfpga/smc_api.c +++ b/arch/arm/mach-socfpga/smc_api.c @@ -54,3 +54,20 @@ int smc_send_mailbox(u32 cmd, u32 len, u32 *arg, u8 urgent, u32 *resp_buf_len, return (int)resp[0]; } + +int smc_get_usercode(u32 *usercode) +{ + int ret; + u64 resp; + + if (!usercode) + return -EINVAL; + + ret = invoke_smc(INTEL_SIP_SMC_GET_USERCODE, NULL, 0, + &resp, 1); + + if (ret == INTEL_SIP_SMC_STATUS_OK) + *usercode = (u32)resp; + + return ret; +} |