[PATCH v2] i.MX8 crypto/fsl: Enable fsl CAAM rng driver

Gaurav Jain gaurav.jain at nxp.com
Fri Apr 22 13:08:34 CEST 2022


rng driver enabled to read random number using caam.

Signed-off-by: Gaurav Jain <gaurav.jain at nxp.com>
---
 drivers/crypto/fsl/jr.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index 85a3dac796..acd29924f7 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -767,8 +767,14 @@ init:
 		return -1;
 	}
 #if CONFIG_IS_ENABLED(OF_CONTROL)
-	if (ofnode_valid(scu_node))
+	if (ofnode_valid(scu_node)) {
+		if (IS_ENABLED(CONFIG_DM_RNG)) {
+			ret = device_bind_driver(NULL, "caam-rng", "caam-rng", NULL);
+			if (ret)
+				printf("Couldn't bind rng driver (%d)\n", ret);
+		}
 		return ret;
+	}
 #endif
 
 #ifdef CONFIG_FSL_CORENET
-- 
2.25.1



More information about the U-Boot mailing list