Lines Matching refs:ts

95 				       struct timespec64 const *ts)  in ksz_ptp_tou_target_time_set()  argument
100 if ((ts->tv_sec & 0xffffffff) != ts->tv_sec) in ksz_ptp_tou_target_time_set()
103 ret = ksz_write32(dev, REG_TRIG_TARGET_NANOSEC, ts->tv_nsec); in ksz_ptp_tou_target_time_set()
107 ret = ksz_write32(dev, REG_TRIG_TARGET_SEC, ts->tv_sec); in ksz_ptp_tou_target_time_set()
296 int ksz_get_ts_info(struct dsa_switch *ds, int port, struct ethtool_ts_info *ts) in ksz_get_ts_info() argument
306 ts->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE | in ksz_get_ts_info()
310 ts->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ONESTEP_P2P); in ksz_get_ts_info()
313 ts->tx_types |= BIT(HWTSTAMP_TX_ON); in ksz_get_ts_info()
315 ts->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | in ksz_get_ts_info()
320 ts->phc_index = ptp_clock_index(ptp_data->clock); in ksz_get_ts_info()
439 struct timespec64 ts; in ksz_tstamp_reconstruct() local
442 ts = ktime_to_timespec64(tstamp); in ksz_tstamp_reconstruct()
449 ts.tv_sec = (ptp_clock_time.tv_sec & ~3) | ts.tv_sec; in ksz_tstamp_reconstruct()
452 diff = timespec64_sub(ts, ptp_clock_time); in ksz_tstamp_reconstruct()
454 ts.tv_sec -= 4; in ksz_tstamp_reconstruct()
456 ts.tv_sec += 4; in ksz_tstamp_reconstruct()
458 return timespec64_to_ktime(ts); in ksz_tstamp_reconstruct()
595 static int _ksz_ptp_gettime(struct ksz_device *dev, struct timespec64 *ts) in _ksz_ptp_gettime() argument
619 ts->tv_sec = seconds; in _ksz_ptp_gettime()
620 ts->tv_nsec = nanoseconds + phase * 8; in _ksz_ptp_gettime()
625 static int ksz_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in ksz_ptp_gettime() argument
632 ret = _ksz_ptp_gettime(dev, ts); in ksz_ptp_gettime()
684 const struct timespec64 *ts) in ksz_ptp_settime() argument
697 ret = ksz_write32(dev, REG_PTP_RTC_NANOSEC, ts->tv_nsec); in ksz_ptp_settime()
701 ret = ksz_write32(dev, REG_PTP_RTC_SEC, ts->tv_sec); in ksz_ptp_settime()
722 ptp_data->clock_time = *ts; in ksz_ptp_settime()
873 struct timespec64 ts; in ksz_ptp_do_aux_work() local
877 ret = _ksz_ptp_gettime(dev, &ts); in ksz_ptp_do_aux_work()
882 ptp_data->clock_time = ts; in ksz_ptp_do_aux_work()