diff mbox series

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

Message ID 20220422110834.1740402-1-gaurav.jain@nxp.com
State Accepted
Commit db74ced5dffc438924ac6ef2780bdb53cab50334
Delegated to: Stefano Babic
Headers show
Series [v2] i.MX8 crypto/fsl: Enable fsl CAAM rng driver | expand

Commit Message

Gaurav Jain April 22, 2022, 11:08 a.m. UTC
rng driver enabled to read random number using caam.

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

Comments

Stefano Babic May 20, 2022, 1:43 p.m. UTC | #1
> rng driver enabled to read random number using caam.
> Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

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