Commits
Vladimir Oltean committed e51cc023c37
net: mscc: ocelot: convert to PHYLINK This patch reworks ocelot_board.c (aka the MIPS on the VSC7514) to register a PHYLINK instance for each port. The registration code is local to the VSC7514, but the PHYLINK callback implementation is common so that the Felix DSA front-end can use it as well (but DSA does its own registration). Now Felix can use native PHYLINK callbacks instead of the PHYLIB adaptation layer in DSA, which had issues supporting fixed-link slave ports (no struct phy_device to pass to the adjust_link callback), as well as fixed-link CPU port at 2.5Gbps. The old code from ocelot_port_enable and ocelot_port_disable has been moved into ocelot_phylink_mac_link_up and ocelot_phylink_mac_link_down. The PHY connect operation has been moved from ocelot_port_open to mscc_ocelot_probe in ocelot_board.c. The phy_set_mode_ext() call for the SerDes PHY has also been moved into mscc_ocelot_probe from ocelot_port_open, and since that was the only reason why a reference to it was kept in ocelot_port_private, that reference was removed. Again, the usage of phy_interface_t phy_mode is now local to mscc_ocelot_probe only, after moving the PHY connect operation. So it was also removed from ocelot_port_private. *Maybe* in the future, it can be added back to the common struct ocelot_port, with the purpose of validating mismatches between state->phy_interface and ocelot_port->phy_mode in PHYLINK callbacks. But at the moment that is not critical, since other DSA drivers are not doing that either. No SFP+ modules are in use with Felix/Ocelot yet, to my knowledge. In-band AN is not yet supported, due to the fact that this is a mostly mechanical patch for the moment. The mac_an_restart PHYLINK operation needs to be implemented, as well as mac_link_state. Both are SerDes specific, and Felix does not have its PCS configured yet (it works just by virtue of U-Boot initialization at the moment). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>