Commit b07e675b authored by Madalin Bucur's avatar Madalin Bucur Committed by David S. Miller

fsl/fman: take into account all RGMII modes

Accept the internal delay RGMII variants.
Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d6acfeb1
...@@ -381,6 +381,9 @@ static int init(struct dtsec_regs __iomem *regs, struct dtsec_cfg *cfg, ...@@ -381,6 +381,9 @@ static int init(struct dtsec_regs __iomem *regs, struct dtsec_cfg *cfg,
/* check RGMII support */ /* check RGMII support */
if (iface == PHY_INTERFACE_MODE_RGMII || if (iface == PHY_INTERFACE_MODE_RGMII ||
iface == PHY_INTERFACE_MODE_RGMII_ID ||
iface == PHY_INTERFACE_MODE_RGMII_RXID ||
iface == PHY_INTERFACE_MODE_RGMII_TXID ||
iface == PHY_INTERFACE_MODE_RMII) iface == PHY_INTERFACE_MODE_RMII)
if (tmp & DTSEC_ID2_INT_REDUCED_OFF) if (tmp & DTSEC_ID2_INT_REDUCED_OFF)
return -EINVAL; return -EINVAL;
...@@ -390,7 +393,10 @@ static int init(struct dtsec_regs __iomem *regs, struct dtsec_cfg *cfg, ...@@ -390,7 +393,10 @@ static int init(struct dtsec_regs __iomem *regs, struct dtsec_cfg *cfg,
if (tmp & DTSEC_ID2_INT_REDUCED_OFF) if (tmp & DTSEC_ID2_INT_REDUCED_OFF)
return -EINVAL; return -EINVAL;
is_rgmii = iface == PHY_INTERFACE_MODE_RGMII; is_rgmii = iface == PHY_INTERFACE_MODE_RGMII ||
iface == PHY_INTERFACE_MODE_RGMII_ID ||
iface == PHY_INTERFACE_MODE_RGMII_RXID ||
iface == PHY_INTERFACE_MODE_RGMII_TXID;
is_sgmii = iface == PHY_INTERFACE_MODE_SGMII; is_sgmii = iface == PHY_INTERFACE_MODE_SGMII;
is_qsgmii = iface == PHY_INTERFACE_MODE_QSGMII; is_qsgmii = iface == PHY_INTERFACE_MODE_QSGMII;
......
...@@ -443,7 +443,10 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg, ...@@ -443,7 +443,10 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg,
break; break;
default: default:
tmp |= IF_MODE_GMII; tmp |= IF_MODE_GMII;
if (phy_if == PHY_INTERFACE_MODE_RGMII) if (phy_if == PHY_INTERFACE_MODE_RGMII ||
phy_if == PHY_INTERFACE_MODE_RGMII_ID ||
phy_if == PHY_INTERFACE_MODE_RGMII_RXID ||
phy_if == PHY_INTERFACE_MODE_RGMII_TXID)
tmp |= IF_MODE_RGMII | IF_MODE_RGMII_AUTO; tmp |= IF_MODE_RGMII | IF_MODE_RGMII_AUTO;
} }
iowrite32be(tmp, &regs->if_mode); iowrite32be(tmp, &regs->if_mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment