summaryrefslogtreecommitdiffstats
path: root/drivers/tee/optee/core.c
diff options
context:
space:
mode:
authorSumit Garg <sumit.garg@linaro.org>2019-01-29 11:19:37 +0530
committerJens Wiklander <jens.wiklander@linaro.org>2019-02-01 15:12:46 +0100
commitc3fa24af92445c419c19df5981ab4e41a3ae3361 (patch)
treed868485cdd06f68fffdc9d33450dd6a19878ed0e /drivers/tee/optee/core.c
parent0fc1db9d105915021260eb241661b8e96f5c0f1a (diff)
downloadlinux-stable-c3fa24af92445c419c19df5981ab4e41a3ae3361.tar.gz
linux-stable-c3fa24af92445c419c19df5981ab4e41a3ae3361.tar.bz2
linux-stable-c3fa24af92445c419c19df5981ab4e41a3ae3361.zip
tee: optee: add TEE bus device enumeration support
OP-TEE provides a pseudo TA to enumerate TAs which can act as devices/ services for TEE bus. So implement device enumeration using invoke function: PTA_CMD_GET_DEVICES provided by pseudo TA to fetch array of device UUIDs. Also register these enumerated devices with TEE bus as "optee-clntX" device. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> [jw: fix optee_enumerate_devices() with no devices found] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee/optee/core.c')
-rw-r--r--drivers/tee/optee/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index e5efce3c08e2..ac59c77841a4 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -634,6 +634,10 @@ static struct optee *optee_probe(struct device_node *np)
if (optee->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM)
pr_info("dynamic shared memory is enabled\n");
+ rc = optee_enumerate_devices();
+ if (rc)
+ goto err;
+
pr_info("initialized driver\n");
return optee;
err: