mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
net: stmmac: configure SerDes on mac_finish
SerDes will configure according to the provided interface mode after finish a major reconfiguration of the interface mode. Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Link: https://patch.msgid.link/20250227121522.1802832-5-yong.liang.choong@linux.intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7e2f7e25f6
commit
e654cfc718
|
|
@ -1129,6 +1129,18 @@ static int stmmac_mac_enable_tx_lpi(struct phylink_config *config, u32 timer,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode,
|
||||
phy_interface_t interface)
|
||||
{
|
||||
struct net_device *ndev = to_net_dev(config->dev);
|
||||
struct stmmac_priv *priv = netdev_priv(ndev);
|
||||
|
||||
if (priv->plat->mac_finish)
|
||||
priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode, interface);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct phylink_mac_ops stmmac_phylink_mac_ops = {
|
||||
.mac_get_caps = stmmac_mac_get_caps,
|
||||
.mac_select_pcs = stmmac_mac_select_pcs,
|
||||
|
|
@ -1137,6 +1149,7 @@ static const struct phylink_mac_ops stmmac_phylink_mac_ops = {
|
|||
.mac_link_up = stmmac_mac_link_up,
|
||||
.mac_disable_tx_lpi = stmmac_mac_disable_tx_lpi,
|
||||
.mac_enable_tx_lpi = stmmac_mac_enable_tx_lpi,
|
||||
.mac_finish = stmmac_mac_finish,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -239,6 +239,10 @@ struct plat_stmmacenet_data {
|
|||
int (*serdes_powerup)(struct net_device *ndev, void *priv);
|
||||
void (*serdes_powerdown)(struct net_device *ndev, void *priv);
|
||||
void (*speed_mode_2500)(struct net_device *ndev, void *priv);
|
||||
int (*mac_finish)(struct net_device *ndev,
|
||||
void *priv,
|
||||
unsigned int mode,
|
||||
phy_interface_t interface);
|
||||
void (*ptp_clk_freq_config)(struct stmmac_priv *priv);
|
||||
int (*init)(struct platform_device *pdev, void *priv);
|
||||
void (*exit)(struct platform_device *pdev, void *priv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user