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 <sjg@chromium.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
This commit is contained in:
Quentin Schulz
2026-06-03 16:55:55 +02:00
committed by Jerome Forissier
parent 081ffe9b3f
commit 4cbd0faab8
+3 -4
View File
@@ -16,7 +16,6 @@
#ifdef CONFIG_FSL_ESDHC
#include <fsl_esdhc.h>
#endif
#include <tsec.h>
#include <asm/arch/immap_ls102xa.h>
#include <fsl_sec.h>
#include <dm.h>
@@ -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);