Commit 639e4b93 authored by Andrew Lunn's avatar Andrew Lunn Committed by Paolo Abeni

net: dsa: sja1105: Convert to mdiobus_c45_read

Stop using the helpers to construct a special phy address which
indicates C45. Instead use the C45 accessors, which will call the
busses C45 specific read/write API.
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent cad75717
...@@ -2252,14 +2252,13 @@ int sja1105_static_config_reload(struct sja1105_private *priv, ...@@ -2252,14 +2252,13 @@ int sja1105_static_config_reload(struct sja1105_private *priv,
* change it through the dynamic interface later. * change it through the dynamic interface later.
*/ */
for (i = 0; i < ds->num_ports; i++) { for (i = 0; i < ds->num_ports; i++) {
u32 reg_addr = mdiobus_c45_addr(MDIO_MMD_VEND2, MDIO_CTRL1);
speed_mbps[i] = sja1105_port_speed_to_ethtool(priv, speed_mbps[i] = sja1105_port_speed_to_ethtool(priv,
mac[i].speed); mac[i].speed);
mac[i].speed = priv->info->port_speed[SJA1105_SPEED_AUTO]; mac[i].speed = priv->info->port_speed[SJA1105_SPEED_AUTO];
if (priv->xpcs[i]) if (priv->xpcs[i])
bmcr[i] = mdiobus_read(priv->mdio_pcs, i, reg_addr); bmcr[i] = mdiobus_c45_read(priv->mdio_pcs, i,
MDIO_MMD_VEND2, MDIO_CTRL1);
} }
/* No PTP operations can run right now */ /* No PTP operations can run right now */
......
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