mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 00:39:30 -04:00
net: fec: use phy_interface_mode_is_rgmii() to check RGMII mode
Use the generic helper function phy_interface_mode_is_rgmii() to check RGMII mode. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20250711091639.1374411-2-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1194,10 +1194,7 @@ fec_restart(struct net_device *ndev)
|
||||
rcntl |= 0x40000000 | 0x00000020;
|
||||
|
||||
/* RGMII, RMII or MII */
|
||||
if (fep->phy_interface == PHY_INTERFACE_MODE_RGMII ||
|
||||
fep->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
|
||||
fep->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID ||
|
||||
fep->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID)
|
||||
if (phy_interface_mode_is_rgmii(fep->phy_interface))
|
||||
rcntl |= (1 << 6);
|
||||
else if (fep->phy_interface == PHY_INTERFACE_MODE_RMII)
|
||||
rcntl |= FEC_RCR_RMII;
|
||||
|
||||
Reference in New Issue
Block a user