]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 26 Aug 2024 10:25:11 +0000 (15:55 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 30 Aug 2024 19:57:39 +0000 (13:57 -0600)
In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS
driver in board_init_f().

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
arch/arm/mach-k3/am62x/am625_init.c

index 72a752d38e88f8313f17b5d535ea87dde14ed6ba..595fc391ac5aac4b5591cead15f21abf044165cf 100644 (file)
@@ -282,6 +282,15 @@ void board_init_f(ulong dummy)
        }
        spl_enable_cache();
 
+       if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
+           spl_boot_device() == BOOT_DEVICE_ETHERNET) {
+               struct udevice *cpswdev;
+
+               if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
+                                               &cpswdev))
+                       printf("Failed to probe am65_cpsw_nuss driver\n");
+       }
+
        fixup_a53_cpu_freq_by_speed_grade();
 }