mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
net: stmmac: move stmmac_init_ptp() messages into function
Move the stmmac_init_ptp() messages from stmmac_hw_setup() to stmmac_init_ptp(), which will allow further cleanups. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
67ec43792b
commit
4fbd180acd
|
|
@ -788,8 +788,13 @@ static int stmmac_init_ptp(struct stmmac_priv *priv)
|
|||
priv->plat->ptp_clk_freq_config(priv);
|
||||
|
||||
ret = stmmac_init_tstamp_counter(priv, STMMAC_HWTS_ACTIVE);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
if (ret == -EOPNOTSUPP)
|
||||
netdev_info(priv->dev, "PTP not supported by HW\n");
|
||||
else
|
||||
netdev_warn(priv->dev, "PTP init failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
priv->adv_ts = 0;
|
||||
/* Check if adv_ts can be enabled for dwmac 4.x / xgmac core */
|
||||
|
|
@ -3497,12 +3502,7 @@ static int stmmac_hw_setup(struct net_device *dev, bool ptp_register)
|
|||
ERR_PTR(ret));
|
||||
}
|
||||
|
||||
ret = stmmac_init_ptp(priv);
|
||||
if (ret == -EOPNOTSUPP)
|
||||
netdev_info(priv->dev, "PTP not supported by HW\n");
|
||||
else if (ret)
|
||||
netdev_warn(priv->dev, "PTP init failed\n");
|
||||
else if (ptp_register)
|
||||
if (stmmac_init_ptp(priv) == 0 && ptp_register)
|
||||
stmmac_ptp_register(priv);
|
||||
|
||||
if (priv->use_riwt) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user