arch: arm: mach-k3: am62a7: Probe CPSW NUSS in board_init_f()
authorNathan Morrisson <nmorrisson@phytec.com>
Tue, 25 Mar 2025 03:58:21 +0000 (04:58 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 10 Apr 2025 21:03:32 +0000 (15:03 -0600)
Probe CPSW NUSS in am62a7 board_init_f() to support ethernet boot.

Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com>
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
arch/arm/mach-k3/am62ax/am62a7_init.c

index 698e6d5..52a2127 100644 (file)
@@ -194,6 +194,15 @@ void board_init_f(ulong dummy)
 
        setup_qos();
 
+       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");
+       }
+
        debug("am62a_init: %s done\n", __func__);
 }