diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2019-01-18 10:35:54 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2019-01-18 11:23:04 +0800 |
commit | 869eebc39d193911da43a6a872a41568dd82890d (patch) | |
tree | 7aacad593e86cf95af55ebef7fb16bfca90d721e /plat/imx/common | |
parent | dbfa45e8163336daa2b1b8a76fcc74976a6aa6d7 (diff) |
imx: add i.MX8 SoCs thermal alarm SIP(silicon provider) service support
For NXP's i.MX8 SoCs with system controller inside, thermal sensors
are maintained by SCFW, Linux needs to call SMC to trap to TF-A for
thermal alarm operation etc. by calling SCFW API.
This patch adds temperature alarm SIP service support.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'plat/imx/common')
-rw-r--r-- | plat/imx/common/imx_sip_handler.c | 9 | ||||
-rw-r--r-- | plat/imx/common/imx_sip_svc.c | 2 | ||||
-rw-r--r-- | plat/imx/common/include/imx_sip_svc.h | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/plat/imx/common/imx_sip_handler.c b/plat/imx/common/imx_sip_handler.c index a096a060..469e2953 100644 --- a/plat/imx/common/imx_sip_handler.c +++ b/plat/imx/common/imx_sip_handler.c @@ -128,3 +128,12 @@ int imx_otp_handler(uint32_t smc_fid, return ret; } + +int imx_misc_set_temp_handler(uint32_t smc_fid, + u_register_t x1, + u_register_t x2, + u_register_t x3, + u_register_t x4) +{ + return sc_misc_set_temp(ipc_handle, x1, x2, x3, x4); +} diff --git a/plat/imx/common/imx_sip_svc.c b/plat/imx/common/imx_sip_svc.c index e7afb3c6..d66c24e0 100644 --- a/plat/imx/common/imx_sip_svc.c +++ b/plat/imx/common/imx_sip_svc.c @@ -37,6 +37,8 @@ static uintptr_t imx_sip_handler(unsigned int smc_fid, case IMX_SIP_OTP_READ: case IMX_SIP_OTP_WRITE: return imx_otp_handler(smc_fid, handle, x1, x2); + case IMX_SIP_MISC_SET_TEMP: + SMC_RET1(handle, imx_misc_set_temp_handler(smc_fid, x1, x2, x3, x4)); #endif default: WARN("Unimplemented i.MX SiP Service Call: 0x%x\n", smc_fid); diff --git a/plat/imx/common/include/imx_sip_svc.h b/plat/imx/common/include/imx_sip_svc.h index 3fa6b82c..c259d23c 100644 --- a/plat/imx/common/include/imx_sip_svc.h +++ b/plat/imx/common/include/imx_sip_svc.h @@ -21,6 +21,8 @@ #define IMX_SIP_OTP_READ 0xC200000A #define IMX_SIP_OTP_WRITE 0xC200000B +#define IMX_SIP_MISC_SET_TEMP 0xC200000C + #if (defined(PLAT_IMX8QM) || defined(PLAT_IMX8QX)) int imx_cpufreq_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, u_register_t x3); @@ -30,6 +32,9 @@ int imx_wakeup_src_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, u_register_t x3); int imx_otp_handler(uint32_t smc_fid, void *handle, u_register_t x1, u_register_t x2); +int imx_misc_set_temp_handler(uint32_t smc_fid, u_register_t x1, + u_register_t x2, u_register_t x3, + u_register_t x4); #endif #endif /* __IMX_SIP_SVC_H__ */ |