]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: stmmac: socfpga: convert to use phy_interface
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 17 Sep 2025 15:12:21 +0000 (16:12 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 20 Sep 2025 00:19:44 +0000 (17:19 -0700)
dwmac-socfpga uses MII, RMII, GMII, RGMII, SGMII and 1000BASE-X
interface modes, and supports the Lynx PCS. The Lynx PCS will only be
used for SGMII and 1000BASE-X modes, with the MAC programmed to use
GMII or MII mode to talk to the PCS. This suggests that the Synopsys
optional dwmac PCS is not present.

None of the DTS files set "mac-mode", so mac_interface will be
identical to phy_interface.

Convert dwmac-socfpga to use phy_interface when determining the
interface mode rather than mac_interface.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1uytpV-00000006H2R-2nA6@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c

index 01dd0cf0923cab07d2b273fe84b9d40e2296084d..354f01184e6cc24ad0152030c9025e3e4b1aae0b 100644 (file)
@@ -234,7 +234,7 @@ err_node_put:
 
 static int socfpga_get_plat_phymode(struct socfpga_dwmac *dwmac)
 {
-       return dwmac->plat_dat->mac_interface;
+       return dwmac->plat_dat->phy_interface;
 }
 
 static void socfpga_sgmii_config(struct socfpga_dwmac *dwmac, bool enable)