Lines Matching refs:ts
41 static int gem_tsu_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts,
63 ts->tv_nsec = gem_readl(bp, TN);
68 ts->tv_nsec = first;
72 ts->tv_sec = (((u64)sech << GEM_TSL_SIZE) | secl)
78 const struct timespec64 *ts)
84 secl = (u32)ts->tv_sec;
85 sech = (ts->tv_sec >> GEM_TSL_SIZE) & ((1 << GEM_TSH_SIZE) - 1);
86 ns = ts->tv_nsec;
222 struct timespec64 ts;
225 ts = ns_to_timespec64(ktime_to_ns(ktime_get_real()));
228 gem_tsu_set_time(&bp->ptp_clock_info, &ts);
247 u32 dma_desc_ts_2, struct timespec64 *ts)
251 ts->tv_sec = (GEM_BFEXT(DMA_SECH, dma_desc_ts_2) << GEM_DMA_SECL_SIZE) |
253 ts->tv_nsec = GEM_BFEXT(DMA_NSEC, dma_desc_ts_1);
261 ts->tv_sec |= ((~GEM_DMA_SEC_MASK) & tsu.tv_sec);
267 if ((ts->tv_sec & (GEM_DMA_SEC_TOP >> 1)) &&
269 ts->tv_sec -= GEM_DMA_SEC_TOP;
279 struct timespec64 ts;
289 gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts);
291 shhwtstamps->hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
300 struct timespec64 ts;
318 gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts);
321 shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);