config RNG_OPTEE
bool "OP-TEE based Random Number Generator support"
depends on DM_RNG && OPTEE
+ default y if OPTEE_SERVICE_DISCOVERY
help
This driver provides support for the OP-TEE based Random Number
Generator on ARM SoCs where hardware entropy sources are not
#include <dm/device.h>
#include <dm/device_compat.h>
#include <linux/sizes.h>
+#include <tee/optee_service.h>
+
+#define DRIVER_NAME "optee-rng"
#define TEE_ERROR_HEALTH_TEST_FAIL 0x00000001
#define TA_HWRNG_UUID { 0xab7a617c, 0xb8e7, 0x4d8f, \
{ 0x83, 0x01, 0xd0, 0x9b, 0x61, 0x03, 0x6b, 0x64 } }
+OPTEE_SERVICE_DRIVER(optee_rng, TA_HWRNG_UUID, DRIVER_NAME);
+
/** open_session_ta_hwrng() - Open session with hwrng Trusted App
*
* @dev: device
};
U_BOOT_DRIVER(optee_rng) = {
- .name = "optee-rng",
+ .name = DRIVER_NAME,
.id = UCLASS_RNG,
.ops = &optee_rng_ops,
.probe = optee_rng_probe,