]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mach-k3: common: Instantiate AM65 CPSW NUSS wrapper
authorVignesh Raghavendra <vigneshr@ti.com>
Fri, 24 Dec 2021 07:25:29 +0000 (12:55 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 15 Jan 2022 15:38:26 +0000 (10:38 -0500)
Probe toplevel AM65 CPSW NUSS driver from misc_init_r() when driver
is enabled. Since driver is modeled as UCLASS_MISC, we need to
explicitly probe the driver. Use common misc_init_r() that entire
K3 family of SoCs.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm/mach-k3/common.c

index 2666cd2d7b174d21ebd4cfd28bf70d2b733dfbb7..39d00270b7fa8e16ee0225f88f8476c4e3102850 100644 (file)
@@ -549,3 +549,19 @@ void spl_board_prepare_for_linux(void)
        dcache_disable();
 }
 #endif
+
+int misc_init_r(void)
+{
+       if (IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS)) {
+               struct udevice *dev;
+               int ret;
+
+               ret = uclass_get_device_by_driver(UCLASS_MISC,
+                                                 DM_DRIVER_GET(am65_cpsw_nuss),
+                                                 &dev);
+               if (ret)
+                       printf("Failed to probe am65_cpsw_nuss driver\n");
+       }
+
+       return 0;
+}