]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i.MX8 crypto/fsl: Enable fsl CAAM rng driver
authorGaurav Jain <gaurav.jain@nxp.com>
Fri, 22 Apr 2022 11:08:34 +0000 (16:38 +0530)
committerStefano Babic <sbabic@denx.de>
Thu, 19 May 2022 19:39:36 +0000 (21:39 +0200)
rng driver enabled to read random number using caam.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
drivers/crypto/fsl/jr.c

index 85a3dac79603763ec681c5eae0f43f15be99399e..acd29924f7e70c7220834c74fe473aeff06a7556 100644 (file)
@@ -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