diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2022-03-11 23:22:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-14 10:41:51 +0000 |
commit | f978fe85b8d1d5b879a4ddda7e4baddbe60e4ee8 (patch) | |
tree | cbb477bb49cac7ecf30fe72b4ec02f75ca19ac8f /drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h | |
parent | dpaa2-mac: move setting up supported_interfaces into a function (diff) | |
download | linux-dev-f978fe85b8d1d5b879a4ddda7e4baddbe60e4ee8.tar.xz linux-dev-f978fe85b8d1d5b879a4ddda7e4baddbe60e4ee8.zip |
dpaa2-mac: configure the SerDes phy on a protocol change
This patch integrates the dpaa2-eth driver with the generic PHY
infrastructure in order to search, find and reconfigure the SerDes lanes
in case of a protocol change.
On the .mac_config() callback, the phy_set_mode_ext() API is called so
that the Lynx 28G SerDes PHY driver can change the lane's configuration.
In the same phylink callback the MC firmware is called so that it
reconfigures the MAC side to run using the new protocol.
The consumer drivers - dpaa2-eth and dpaa2-switch - are updated to call
the dpaa2_mac_start/stop functions newly added which will
power_on/power_off the associated SerDes lane.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h index d2e51d21c80c..a58cab188a99 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h @@ -26,6 +26,8 @@ struct dpaa2_mac { enum dpmac_link_type if_link_type; struct phylink_pcs *pcs; struct fwnode_handle *fw_node; + + struct phy *serdes_phy; }; bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev, @@ -45,4 +47,8 @@ void dpaa2_mac_get_strings(u8 *data); void dpaa2_mac_get_ethtool_stats(struct dpaa2_mac *mac, u64 *data); +void dpaa2_mac_start(struct dpaa2_mac *mac); + +void dpaa2_mac_stop(struct dpaa2_mac *mac); + #endif /* DPAA2_MAC_H */ |