Lines Matching refs:ptp
3100 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_map_ptp_regs() local
3104 reg_arr = ptp->rx_regs; in bnxt_map_ptp_regs()
3109 reg_arr = ptp->tx_regs; in bnxt_map_ptp_regs()
3115 ptp->rx_mapped_regs[i] = 0x5000 + (ptp->rx_regs[i] & 0xfff); in bnxt_map_ptp_regs()
3118 ptp->tx_mapped_regs[i] = 0x6000 + (ptp->tx_regs[i] & 0xfff); in bnxt_map_ptp_regs()
3144 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_get_tx_ts() local
3148 ptp->tx_mapped_regs[BNXT_PTP_TX_FIFO])); in bnxt_get_tx_ts()
3153 ptp->tx_mapped_regs[BNXT_PTP_TX_FIFO])); in bnxt_get_tx_ts()
3155 ptp->tx_mapped_regs[BNXT_PTP_TX_TS_L])); in bnxt_get_tx_ts()
3157 ptp->tx_mapped_regs[BNXT_PTP_TX_TS_H])) << 32; in bnxt_get_tx_ts()
3164 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_get_rx_ts() local
3169 if (!ptp) in bnxt_get_rx_ts()
3173 ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO])); in bnxt_get_rx_ts()
3179 ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO_ADV]); in bnxt_get_rx_ts()
3182 ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO])); in bnxt_get_rx_ts()
3189 ptp->rx_mapped_regs[BNXT_PTP_RX_TS_L])); in bnxt_get_rx_ts()
3191 ptp->rx_mapped_regs[BNXT_PTP_RX_TS_H])) << 32; in bnxt_get_rx_ts()
3201 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_write_time() local
3203 if (!ptp) in bnxt_timesync_write_time()
3208 ptp->tc.nsec = ns; in bnxt_timesync_write_time()
3217 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_read_time() local
3221 if (!ptp) in bnxt_timesync_read_time()
3230 ns = rte_timecounter_update(&ptp->tc, systime_cycles); in bnxt_timesync_read_time()
3239 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_enable() local
3243 if (!ptp) in bnxt_timesync_enable()
3246 ptp->rx_filter = 1; in bnxt_timesync_enable()
3247 ptp->tx_tstamp_en = 1; in bnxt_timesync_enable()
3248 ptp->rxctl = BNXT_PTP_MSG_EVENTS; in bnxt_timesync_enable()
3254 memset(&ptp->tc, 0, sizeof(struct rte_timecounter)); in bnxt_timesync_enable()
3255 memset(&ptp->rx_tstamp_tc, 0, sizeof(struct rte_timecounter)); in bnxt_timesync_enable()
3256 memset(&ptp->tx_tstamp_tc, 0, sizeof(struct rte_timecounter)); in bnxt_timesync_enable()
3258 ptp->tc.cc_mask = BNXT_CYCLECOUNTER_MASK; in bnxt_timesync_enable()
3259 ptp->tc.cc_shift = shift; in bnxt_timesync_enable()
3260 ptp->tc.nsec_mask = (1ULL << shift) - 1; in bnxt_timesync_enable()
3262 ptp->rx_tstamp_tc.cc_mask = BNXT_CYCLECOUNTER_MASK; in bnxt_timesync_enable()
3263 ptp->rx_tstamp_tc.cc_shift = shift; in bnxt_timesync_enable()
3264 ptp->rx_tstamp_tc.nsec_mask = (1ULL << shift) - 1; in bnxt_timesync_enable()
3266 ptp->tx_tstamp_tc.cc_mask = BNXT_CYCLECOUNTER_MASK; in bnxt_timesync_enable()
3267 ptp->tx_tstamp_tc.cc_shift = shift; in bnxt_timesync_enable()
3268 ptp->tx_tstamp_tc.nsec_mask = (1ULL << shift) - 1; in bnxt_timesync_enable()
3280 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_disable() local
3282 if (!ptp) in bnxt_timesync_disable()
3285 ptp->rx_filter = 0; in bnxt_timesync_disable()
3286 ptp->tx_tstamp_en = 0; in bnxt_timesync_disable()
3287 ptp->rxctl = 0; in bnxt_timesync_disable()
3303 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_read_rx_timestamp() local
3307 if (!ptp) in bnxt_timesync_read_rx_timestamp()
3311 rx_tstamp_cycles = ptp->rx_timestamp; in bnxt_timesync_read_rx_timestamp()
3315 ns = rte_timecounter_update(&ptp->rx_tstamp_tc, rx_tstamp_cycles); in bnxt_timesync_read_rx_timestamp()
3325 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_read_tx_timestamp() local
3330 if (!ptp) in bnxt_timesync_read_tx_timestamp()
3339 ns = rte_timecounter_update(&ptp->tx_tstamp_tc, tx_tstamp_cycles); in bnxt_timesync_read_tx_timestamp()
3349 struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; in bnxt_timesync_adjust_time() local
3351 if (!ptp) in bnxt_timesync_adjust_time()
3354 ptp->tc.nsec += delta; in bnxt_timesync_adjust_time()