From: Kishon Vijay Abraham I <[email protected]>

In order to support Ethernet boot on AM62x, probe AM65 CPSW NUSS
driver in board_init_f().

Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Siddharth Vadapalli <[email protected]>
Signed-off-by: Chintan Vankar <[email protected]>
---

Link to v4:
https://lore.kernel.org/r/[email protected]/

Changes from v4 to v5:
- No Changes.

 arch/arm/mach-k3/am62x/am625_init.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-k3/am62x/am625_init.c 
b/arch/arm/mach-k3/am62x/am625_init.c
index 72a752d38e8..0182c153a68 100644
--- a/arch/arm/mach-k3/am62x/am625_init.c
+++ b/arch/arm/mach-k3/am62x/am625_init.c
@@ -280,6 +280,16 @@ void board_init_f(ulong dummy)
                if (ret)
                        panic("DRAM init failed: %d\n", ret);
        }
+
+       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");
+       }
+
        spl_enable_cache();
 
        fixup_a53_cpu_freq_by_speed_grade();
-- 
2.34.1

Reply via email to