Skip to content

Commit 94c82de

Browse files
Mohammad Athari Bin Ismaildavem330
authored andcommitted
net: stmmac: configure PTP clock source prior to PTP initialization
For Intel platform, it is required to configure PTP clock source prior PTP initialization in MAC. So, need to move ptp_clk_freq_config execution from stmmac_ptp_register() to stmmac_init_ptp(). Fixes: 76da35d ("stmmac: intel: Add PSE and PCH PTP clock source selection") Cc: <[email protected]> # 5.15.x Signed-off-by: Mohammad Athari Bin Ismail <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3626898 commit 94c82de

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,9 @@ static int stmmac_init_ptp(struct stmmac_priv *priv)
890890
bool xmac = priv->plat->has_gmac4 || priv->plat->has_xgmac;
891891
int ret;
892892

893+
if (priv->plat->ptp_clk_freq_config)
894+
priv->plat->ptp_clk_freq_config(priv);
895+
893896
ret = stmmac_init_tstamp_counter(priv, STMMAC_HWTS_ACTIVE);
894897
if (ret)
895898
return ret;

drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,6 @@ void stmmac_ptp_register(struct stmmac_priv *priv)
297297
{
298298
int i;
299299

300-
if (priv->plat->ptp_clk_freq_config)
301-
priv->plat->ptp_clk_freq_config(priv);
302-
303300
for (i = 0; i < priv->dma_cap.pps_out_num; i++) {
304301
if (i >= STMMAC_PPS_MAX)
305302
break;

0 commit comments

Comments
 (0)