net: stmmac: Link serdes_loopback_v3_1 to ethqos function
Link serdes_loopback_v3_1 function pointer to qcom_serdes_loopback_v3_1 function. Change-Id: I167dead399f4081272b044563860fb41ac111bac Signed-off-by: Srinath Pandey <quic_srinpand@quicinc.com>
This commit is contained in:
parent
465c6c6a12
commit
6a0a3670c3
@ -874,7 +874,7 @@ static int ethqos_configure_mac_v3(struct qcom_ethqos *ethqos)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void qcom_serdes_loopback_v3_1(struct plat_stmmacenet_data *plat, bool on)
|
||||
static void qcom_serdes_loopback_v3_1(struct plat_stmmacenet_data *plat, bool on)
|
||||
{
|
||||
struct qcom_ethqos *ethqos = plat->bsp_priv;
|
||||
|
||||
@ -1473,6 +1473,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
|
||||
|
||||
plat_dat->bsp_priv = ethqos;
|
||||
plat_dat->fix_mac_speed = ethqos_fix_mac_speed;
|
||||
plat_dat->serdes_loopback_v3_1 = qcom_serdes_loopback_v3_1;
|
||||
plat_dat->dump_debug_regs = rgmii_dump;
|
||||
plat_dat->has_gmac4 = 1;
|
||||
if (plat_dat->interface == PHY_INTERFACE_MODE_SGMII ||
|
||||
|
@ -378,7 +378,6 @@ void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue);
|
||||
void stmmac_disable_tx_queue(struct stmmac_priv *priv, u32 queue);
|
||||
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue);
|
||||
int stmmac_xsk_wakeup(struct net_device *dev, u32 queue, u32 flags);
|
||||
void qcom_serdes_loopback_v3_1(struct plat_stmmacenet_data *plat, bool on);
|
||||
struct timespec64 stmmac_calc_tas_basetime(ktime_t old_base_time,
|
||||
ktime_t current_time,
|
||||
u64 cycle_time);
|
||||
|
@ -1072,8 +1072,8 @@ static void stmmac_mac_link_down(struct phylink_config *config,
|
||||
{
|
||||
struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev));
|
||||
|
||||
if (priv->plat->pcs_v3)
|
||||
qcom_serdes_loopback_v3_1(priv->plat, true);
|
||||
if (priv->plat->pcs_v3 && priv->plat->serdes_loopback_v3_1)
|
||||
priv->plat->serdes_loopback_v3_1(priv->plat, true);
|
||||
|
||||
stmmac_mac_set(priv, priv->ioaddr, false);
|
||||
priv->eee_active = false;
|
||||
@ -1094,8 +1094,8 @@ static void stmmac_mac_link_up(struct phylink_config *config,
|
||||
struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev));
|
||||
u32 old_ctrl, ctrl;
|
||||
|
||||
if (priv->plat->pcs_v3)
|
||||
qcom_serdes_loopback_v3_1(priv->plat, false);
|
||||
if (priv->plat->pcs_v3 && priv->plat->serdes_loopback_v3_1)
|
||||
priv->plat->serdes_loopback_v3_1(priv->plat, false);
|
||||
|
||||
old_ctrl = readl(priv->ioaddr + MAC_CTRL_REG);
|
||||
ctrl = old_ctrl & ~priv->hw->link.speed_mask;
|
||||
@ -3930,8 +3930,8 @@ static int __stmmac_open(struct net_device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
if (priv->plat->pcs_v3)
|
||||
qcom_serdes_loopback_v3_1(priv->plat, true);
|
||||
if (priv->plat->pcs_v3 && priv->plat->serdes_loopback_v3_1)
|
||||
priv->plat->serdes_loopback_v3_1(priv->plat, true);
|
||||
|
||||
/* Extra statistics */
|
||||
memset(&priv->xstats, 0, sizeof(struct stmmac_extra_stats));
|
||||
|
@ -235,6 +235,7 @@ struct plat_stmmacenet_data {
|
||||
struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES];
|
||||
struct stmmac_txq_cfg tx_queues_cfg[MTL_MAX_TX_QUEUES];
|
||||
void (*fix_mac_speed)(void *priv, unsigned int speed);
|
||||
void (*serdes_loopback_v3_1)(struct plat_stmmacenet_data *plat, bool on);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user