net: mscc: ocelot: make phy_mode a member of the common struct ocelot_port
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 6 Jan 2020 01:34:15 +0000 (03:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 07:22:33 +0000 (23:22 -0800)
commitee50d07c9fc8155b5a3c6c29eae1459a12cf2fb4
tree1857ca1293888c173409f19d094471e3e4d2a67f
parentd79d30327f7095e660801271f6740c0aeae0741b
net: mscc: ocelot: make phy_mode a member of the common struct ocelot_port

The Ocelot switchdev driver and the Felix DSA one need it for different
reasons. Felix (or at least the VSC9959 instantiation in NXP LS1028A) is
integrated with the traditional NXP Layerscape PCS design which does not
support runtime configuration of SerDes protocol. So it needs to
pre-validate the phy-mode from the device tree and prevent PHYLINK from
attempting to change it. For this, it needs to cache it in a private
variable.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot.h
drivers/net/ethernet/mscc/ocelot_board.c
include/soc/mscc/ocelot.h