[PATCH v4] tee: optee: rework TA bus scanning code

Patrick DELAUNAY patrick.delaunay at foss.st.com
Tue Sep 6 15:37:39 CEST 2022


Hi,

On 9/6/22 11:37, Ilias Apalodimas wrote:
> Late versions of OP-TEE support a pseudo bus.  TAs that behave as
> hardware blocks (e.g TPM, RNG etc) present themselves on a bus which we can
> scan.  Unfortunately U-Boot doesn't support that yet. It's worth noting
> that we already have a workaround for RNG.  The details are in
> commit 70812bb83da6 ("tee: optee: bind rng optee driver")
>
> So let's add a list of devices based on U-Boot Kconfig options that we will
> scan until we properly implement the tee-bus functionality.
>
> While at it change the behaviour of the tee core itself wrt to device
> binding.  If some device binding fails, print a warning instead of
> disabling OP-TEE.
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Reviewed-by: Jens Wiklander <jens.wiklander at linaro.org>
> Reviewed-by: Etienne Carriere <etienne.carriere at linaro.org>
> ---
> Changes since v3:
> - Use NULL instead of a child ptr on device_bind_driver(), since it's not
> really needed
> - Changed the style of the optee_bus_probe[] definition to
>    {.drv_name = xxx, .dev_name = yyy }
>
> Changes since v2:
> - Fixed typo on driver name ftpm-tee -> ftpm_tee
>
> Changes since v1:
> - remove a macro and use ARRAY_SIZE directly
>   drivers/tee/optee/core.c | 24 +++++++++++++++++++-----
>   1 file changed, 19 insertions(+), 5 deletions(-)
>


Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>

Thanks
Patrick



More information about the U-Boot mailing list