From 4cbd0faab82cf6477236205b5e0894be2110f723 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Thu, 7 May 2026 12:37:09 +0200 Subject: [PATCH] arm: ls102xa: use platform data to check Ethernet interface is not SGMII tsec_private should, as its name suggests, be private. In the next commit, it'll be moved from a publicly available header file to the C file that requires it. ls102xa currently does not allow us to do that because it uses the structure. The flag is actually set if the Ethernet PHY interface is SGMII in drivers/net/tsec.c, so simply replace the current check with the same check made in drivers/net/tsec.c to set the flag. Reviewed-by: Simon Glass Signed-off-by: Quentin Schulz --- arch/arm/cpu/armv7/ls102xa/fdt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c index 34eea22eb92..09092ea7b7f 100644 --- a/arch/arm/cpu/armv7/ls102xa/fdt.c +++ b/arch/arm/cpu/armv7/ls102xa/fdt.c @@ -16,7 +16,6 @@ #ifdef CONFIG_FSL_ESDHC #include #endif -#include #include #include #include @@ -26,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; void ft_fixup_enet_phy_connect_type(void *fdt) { struct udevice *dev; - struct tsec_private *priv; + struct eth_pdata *pdata; const char *enet_path, *phy_path; char enet[16]; char phy[16]; @@ -45,8 +44,8 @@ void ft_fixup_enet_phy_connect_type(void *fdt) continue; } - priv = dev_get_priv(dev); - if (priv->flags & TSEC_SGMII) + pdata = dev_get_plat(dev); + if (pdata->phy_interface == PHY_INTERFACE_MODE_SGMII) continue; enet_path = fdt_get_alias(fdt, enet); -- 2.47.3