net: stmmac: switch to use interrupt for hw crosstimestamping
[platform/kernel/linux-starfive.git] / drivers / net / ethernet / stmicro / stmmac / stmmac_hwtstamp.c
index 92d3294..764832f 100644 (file)
@@ -179,6 +179,11 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
        u64 ptp_time;
        int i;
 
+       if (priv->plat->int_snapshot_en) {
+               wake_up(&priv->tstamp_busy_wait);
+               return;
+       }
+
        tsync_int = readl(priv->ioaddr + GMAC_INT_STATUS) & GMAC_INT_TSIE;
 
        if (!tsync_int)