]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL
authorVignesh Raghavendra <vigneshr@ti.com>
Fri, 24 Dec 2021 07:25:32 +0000 (12:55 +0530)
committerTom Rini <trini@konsulko.com>
Sat, 15 Jan 2022 15:38:26 +0000 (10:38 -0500)
In order to support Ethernet boot on AM64x, probe AM65 CPSW NUSS.

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

index 958fa05af4d0c2f49942636ebab05625ebec2c85..543dea02bca95d2811607b461515165a493e09a0 100644 (file)
@@ -199,6 +199,13 @@ void board_init_f(ulong dummy)
        if (ret)
                panic("DRAM init failed: %d\n", ret);
 #endif
+       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");
+       }
 }
 
 u32 spl_mmc_boot_mode(const u32 boot_device)