diff options
author | Kshitiz <kshitiz.varshney@nxp.com> | 2022-07-28 08:47:16 +0200 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2022-08-01 15:32:31 +0800 |
commit | bad5d8ceae877fa35c612ad899f9367fea07a125 (patch) | |
tree | 6dbb4da3ce4ad88fdfac69ea59b48bffa7678352 /arch/arm | |
parent | 944780acdbc9eeebc4a6f667566cdd7f3d8cd025 (diff) |
LFU-369-3: Added dcp_rng driver device binding code
This commit manually binds dcp_rng device driver and initalizes it inside
arch_misc_init() function.
Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/mx6/soc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 3e538754d9..9bf16119c2 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -31,6 +31,8 @@ #include <hang.h> #include <cpu_func.h> #include <env.h> +#include<dm/device-internal.h> +#include<dm/lists.h> DECLARE_GLOBAL_DATA_PTR; @@ -1005,6 +1007,20 @@ int arch_misc_init(void) if (ret) printf("Failed to initialize caam_jr: %d\n", ret); } + + if (IS_ENABLED(CONFIG_FSL_DCP_RNG)) { + struct udevice *dev; + int ret; + + ret = device_bind_driver(NULL, "dcp_rng", "dcp_rng", NULL); + if (ret) + printf("Couldn't bind dcp rng driver (%d)\n", ret); + + ret = uclass_get_device_by_driver(UCLASS_RNG, DM_DRIVER_GET(dcp_rng), &dev); + if (ret) + printf("Failed to initialize dcp rng: %d\n", ret); + } + setup_serial_number(); return 0; } |