-@@ -477,7 +552,10 @@ static int stmmac_hwtstamp_ioctl(struct
- /* PTP v1, UDP, any kind of event packet */
- config.rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT;
- /* take time stamp for all event messages */
-- snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
-+ if (priv->plat->has_gmac4)
-+ snap_type_sel = PTP_GMAC4_TCR_SNAPTYPSEL_1;
-+ else
-+ snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
-
- ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA;
- ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA;
-@@ -509,7 +587,10 @@ static int stmmac_hwtstamp_ioctl(struct
- config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT;
- ptp_v2 = PTP_TCR_TSVER2ENA;
- /* take time stamp for all event messages */
-- snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
-+ if (priv->plat->has_gmac4)
-+ snap_type_sel = PTP_GMAC4_TCR_SNAPTYPSEL_1;
-+ else
-+ snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
-
- ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA;
- ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA;
-@@ -543,7 +624,10 @@ static int stmmac_hwtstamp_ioctl(struct
- config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
- ptp_v2 = PTP_TCR_TSVER2ENA;
- /* take time stamp for all event messages */
-- snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
-+ if (priv->plat->has_gmac4)
-+ snap_type_sel = PTP_GMAC4_TCR_SNAPTYPSEL_1;
-+ else
-+ snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
-
- ptp_over_ipv4_udp = PTP_TCR_TSIPV4ENA;
- ptp_over_ipv6_udp = PTP_TCR_TSIPV6ENA;
-@@ -679,6 +763,19 @@ static void stmmac_release_ptp(struct st