From: Nathan Morrisson <[email protected]>

Probe CPSW NUSS in am62a7 board_init_f() to support ethernet boot.

Signed-off-by: Nathan Morrisson <[email protected]>
Signed-off-by: Wadim Egorov <[email protected]>
---
 arch/arm/mach-k3/am62ax/am62a7_init.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-k3/am62ax/am62a7_init.c 
b/arch/arm/mach-k3/am62ax/am62a7_init.c
index 698e6d5c587..52a21277227 100644
--- a/arch/arm/mach-k3/am62ax/am62a7_init.c
+++ b/arch/arm/mach-k3/am62ax/am62a7_init.c
@@ -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__);
 }
 
-- 
2.34.1

Reply via email to