Lines Matching refs:ts
128 static int hclge_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
143 *ts = ns_to_timespec64(ns);
149 const struct timespec64 *ts)
155 writel(ts->tv_nsec, hdev->ptp->io_base + HCLGE_PTP_TIME_NSEC_REG);
156 writel(ts->tv_sec >> HCLGE_PTP_SEC_H_OFFSET,
158 writel(ts->tv_sec & HCLGE_PTP_SEC_L_MASK,
182 struct timespec64 ts;
185 hclge_ptp_gettimex(ptp, &ts, NULL);
186 ns = timespec64_to_ns(&ts);
188 ts = ns_to_timespec64(ns);
189 return hclge_ptp_settime(ptp, &ts);
474 struct timespec64 ts;
505 "failed to init ts mode, ret = %d\n", ret);
509 ktime_get_real_ts64(&ts);
510 ret = hclge_ptp_settime(&hdev->ptp->info, &ts);
513 "failed to init ts time, ret = %d\n", ret);