Commit 4813497b authored by Marc Gonzalez's avatar Marc Gonzalez Committed by David S. Miller

net: ethernet: nb8800: Handle all 4 RGMII modes identically

Before commit bf8f6952 ("Add blurb about RGMII") it was unclear
whose responsibility it was to insert the required clock skew, and
in hindsight, some PHY drivers got it wrong. The solution forward
is to introduce a new property, explicitly requiring skew from the
node to which it is attached. In the interim, this driver will handle
all 4 RGMII modes identically (no skew).

Fixes: 52dfc830 ("net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller")
Signed-off-by: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80d887db
...@@ -609,7 +609,7 @@ static void nb8800_mac_config(struct net_device *dev) ...@@ -609,7 +609,7 @@ static void nb8800_mac_config(struct net_device *dev)
mac_mode |= HALF_DUPLEX; mac_mode |= HALF_DUPLEX;
if (gigabit) { if (gigabit) {
if (priv->phy_mode == PHY_INTERFACE_MODE_RGMII) if (phy_interface_is_rgmii(dev->phydev))
mac_mode |= RGMII_MODE; mac_mode |= RGMII_MODE;
mac_mode |= GMAC_MODE; mac_mode |= GMAC_MODE;
...@@ -1268,11 +1268,10 @@ static int nb8800_tangox_init(struct net_device *dev) ...@@ -1268,11 +1268,10 @@ static int nb8800_tangox_init(struct net_device *dev)
break; break;
case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII:
pad_mode = PAD_MODE_RGMII; case PHY_INTERFACE_MODE_RGMII_ID:
break; case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_TXID: case PHY_INTERFACE_MODE_RGMII_TXID:
pad_mode = PAD_MODE_RGMII | PAD_MODE_GTX_CLK_DELAY; pad_mode = PAD_MODE_RGMII;
break; break;
default: default:
......
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