Hi,
On 6/17/22 17:36, Etienne Carriere wrote:
This change defines resources for OP-TEE service drivers to register
themselves for being bound to when OP-TEE firmware reports the related
service is supported. OP-TEE services are discovered during optee
driver probe sequence which mandates optee driver is always probe once
bound.
Discovery of optee services and binding to related U-Boot drivers is
embedded upon configuration switch CONFIG_OPTEE_SERVICE_DISCOVERY.
Cc: Jens Wiklander <jens.wiklan...@linaro.org>
Cc: Patrick Delaunay <patrick.delau...@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carri...@linaro.org>
---
Changes since v3:
- Stub OPTEE_SERVICE_DRIVER() macro when CONFIG_OPTEE_SERVICE_DISCOVERY
is disable.
Changes since v2:
- Release allocated shared memory from bind_service_drivers() only.
- Remove definition of useless macro OPTEE_SERVICE_DRIVER_GET().
Changes since v1:
- Remove all #ifdef CONFIG_OPTEE_SERVICE_DISCOVERY directives and replace
with if (IS_ENABLED()) where applicable.
- Incidentally rename local function open_session() to open_enum_session()
and remove local function close_session() for clarity.
- Update commit log to highlight that "optee driver is always probe once
bound" when CONFIG_OPTEE_SERVICE_DISCOVERY is enable.
---
drivers/tee/optee/Kconfig | 8 ++
drivers/tee/optee/core.c | 171 ++++++++++++++++++++++++++++++++++--
include/tee/optee_service.h | 34 +++++++
3 files changed, 208 insertions(+), 5 deletions(-)
create mode 100644 include/tee/optee_service.h
Reviewed-by: Patrick Delaunay <patrick.delau...@foss.st.com>
Thanks
Patrick