tee: optee: Export OP-TEE message UID check API

OP-TEE message UID check API can be useful to know whether OP-TEE
is enabled on not assuming the corresponding SMC call is properly
handled if OP-TEE is not supported.

This API can be used by platform code to know OP-TEE presence and
on that basis OP-TEE DT node can be added as part of DT fixups for
the OP-TEE driver probe to happen for both U-Boot and Linux.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://patch.msgid.link/20260127062341.723966-2-sumit.garg@kernel.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This commit is contained in:
Sumit Garg
2026-01-27 11:53:39 +05:30
committed by Casey Connolly
parent 63c806ba0e
commit 3eefe12b4b
2 changed files with 14 additions and 0 deletions

View File

@@ -65,4 +65,13 @@ static inline int optee_copy_fdt_nodes(void *new_blob)
}
#endif
#if defined(CONFIG_OPTEE)
bool is_optee_smc_api(void);
#else
static inline bool is_optee_smc_api(void)
{
return false;
}
#endif
#endif /* _OPTEE_H */