In U-Boot, the discovery of TA based on its UUID on the TEE bus is
not supported.
This patch only binds the driver associated to the new supported
OP-TEE TA = TA_HWRNG when this driver is enable.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
#include <cpu_func.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <dm/lists.h>
#include <log.h>
#include <malloc.h>
#include <tee.h>
{
struct optee_pdata *pdata = dev_get_plat(dev);
u32 sec_caps;
+ struct udevice *child;
+ int ret;
if (!is_optee_api(pdata->invoke_fn)) {
dev_err(dev, "OP-TEE api uid mismatch\n");
return -ENOENT;
}
+ /*
+ * in U-Boot, the discovery of TA on the TEE bus is not supported:
+ * only bind the drivers associated to the supported OP-TEE TA
+ */
+ if (IS_ENABLED(CONFIG_RNG_OPTEE)) {
+ ret = device_bind_driver(dev, "optee-rng", "optee-rng", &child);
+ if (ret)
+ return ret;
+ }
+
return 0;
}