
On 07/01/2025 11:38, Chintan Vankar wrote:
In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS driver in board_init_f().
Signed-off-by: Chintan Vankar c-vankar@ti.com
arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c index 34ed01cd78c..f8e98b09402 100644 --- a/arch/arm/mach-k3/am62px/am62p5_init.c +++ b/arch/arm/mach-k3/am62px/am62p5_init.c @@ -159,6 +159,16 @@ 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");
- }
Why do you need to do this?
from drivers/net/ti/am65-cpsw-nuss.c
U_BOOT_DRIVER(am65_cpsw_nuss) = { .name = "am65_cpsw_nuss", .id = UCLASS_MISC, .of_match = am65_cpsw_nuss_ids, .probe = am65_cpsw_probe_nuss, .priv_auto = sizeof(struct am65_cpsw_common), };
U_BOOT_DRIVER(am65_cpsw_nuss_port) = { .name = "am65_cpsw_nuss_port", .id = UCLASS_ETH, .probe = am65_cpsw_port_probe, .ops = &am65_cpsw_ops, .priv_auto = sizeof(struct am65_cpsw_priv), .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE, };
Isn't am65_cpsw_port_probe() and am65_cpsw_probe_nuss() getting called? If not, you need to identify why and fix it the proper way. Not by hacking it like you do now.
debug("am62px_init: %s done\n", __func__); }