@@ -2533,6 +2533,22 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
/* Setup for TSN capability */
dwmac_tsn_setup(priv->ioaddr);
+ /* Set TSN HW tunable */
+ if (priv->plat->ptov)
+ stmmac_set_tsn_hwtunable(priv, priv->ioaddr,
+ TSN_HWTUNA_TX_EST_PTOV,
+ &priv->plat->ptov);
+
+ if (priv->plat->ctov)
+ stmmac_set_tsn_hwtunable(priv, priv->ioaddr,
+ TSN_HWTUNA_TX_EST_CTOV,
+ &priv->plat->ctov);
+
+ if (priv->plat->tils)
+ stmmac_set_tsn_hwtunable(priv, priv->ioaddr,
+ TSN_HWTUNA_TX_EST_TILS,
+ &priv->plat->tils);
+
return 0;
}
@@ -176,5 +176,8 @@ struct plat_stmmacenet_data {
int mac_port_sel_speed;
bool en_tx_lpi_clockgating;
int has_xgmac;
+ unsigned int ptov;
+ unsigned int ctov;
+ unsigned int tils;
};
#endif
TSN HW tunable data for PTP Time Offset Value(PTOV), Current Time Offset Value(CTOV) and Time Interval Shift Amount(TILS) are added as platform data. These platform data are set after tsn setup. Signed-off-by: Voon Weifeng <weifeng.voon@intel.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 ++++++++++++++++ include/linux/stmmac.h | 3 +++ 2 files changed, 19 insertions(+)