| 2977 | } |
| 2978 | |
| 2979 | static int |
| 2980 | ngbe_timesync_enable(struct rte_eth_dev *dev) |
| 2981 | { |
| 2982 | struct ngbe_hw *hw = ngbe_dev_hw(dev); |
| 2983 | uint32_t tsync_ctl; |
| 2984 | |
| 2985 | /* Stop the timesync system time. */ |
| 2986 | wr32(hw, NGBE_TSTIMEINC, 0x0); |
| 2987 | /* Reset the timesync system time value. */ |
| 2988 | wr32(hw, NGBE_TSTIMEL, 0x0); |
| 2989 | wr32(hw, NGBE_TSTIMEH, 0x0); |
| 2990 | |
| 2991 | ngbe_start_timecounters(dev); |
| 2992 | |
| 2993 | /* Enable L2 filtering of IEEE1588/802.1AS Ethernet frame types. */ |
| 2994 | wr32(hw, NGBE_ETFLT(NGBE_ETF_ID_1588), |
| 2995 | RTE_ETHER_TYPE_1588 | NGBE_ETFLT_ENA | NGBE_ETFLT_1588); |
| 2996 | |
| 2997 | /* Enable timestamping of received PTP packets. */ |
| 2998 | tsync_ctl = rd32(hw, NGBE_TSRXCTL); |
| 2999 | tsync_ctl |= NGBE_TSRXCTL_ENA; |
| 3000 | wr32(hw, NGBE_TSRXCTL, tsync_ctl); |
| 3001 | |
| 3002 | /* Enable timestamping of transmitted PTP packets. */ |
| 3003 | tsync_ctl = rd32(hw, NGBE_TSTXCTL); |
| 3004 | tsync_ctl |= NGBE_TSTXCTL_ENA; |
| 3005 | wr32(hw, NGBE_TSTXCTL, tsync_ctl); |
| 3006 | |
| 3007 | ngbe_flush(hw); |
| 3008 | |
| 3009 | return 0; |
| 3010 | } |
| 3011 | |
| 3012 | static int |
| 3013 | ngbe_timesync_disable(struct rte_eth_dev *dev) |
nothing calls this directly
no test coverage detected