Added dcp_rng driver initialization code
authorKshitiz Varshney <kshitiz.varshney@nxp.com>
Thu, 22 Dec 2022 08:50:28 +0000 (09:50 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 12 Jan 2023 16:25:46 +0000 (11:25 -0500)
This commit initializes dcp_rng device driver inside
arch_misc_init() function.

Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
arch/arm/mach-imx/mx6/soc.c

index 08f47cf03d26b5087d4d692c371aba18afd37e4d..c2875e727c946994cdf43b301af4164a5f5775cf 100644 (file)
@@ -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;
 }