From: Kshitiz Varshney Date: Thu, 22 Dec 2022 08:50:28 +0000 (+0100) Subject: Added dcp_rng driver initialization code X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=81ceb1695a04f6bee4f74dec12e78d57759d0715;p=u-boot.git Added dcp_rng driver initialization code This commit initializes dcp_rng device driver inside arch_misc_init() function. Signed-off-by: Kshitiz Varshney Reviewed-by: Ye Li --- diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 08f47cf03d..c2875e727c 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -746,6 +746,16 @@ 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 = 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; }