Lines Matching +full:x +full:- +full:ts +full:- +full:routes
1 // SPDX-License-Identifier: GPL-2.0
7 /* The adjfine API clamps ppb between [-32,768,000, 32,768,000], and
8 * therefore scaled_ppm between [-2,147,483,648, 2,147,483,647].
11 * Percentually speaking, this is a +/- 0.032x adjustment of the
12 * free-running counter (0.968x to 1.032x).
20 * one-shot toggle (no return to level) on the PTP_CLK pin. When used as a
29 /* This range is actually +/- SJA1105_MAX_ADJ_PPB
30 * divided by 1000 (ppb -> ppm) and with a 16-bit
34 * Convert scaled_ppm from the +/- ((10^6) << 16) range
35 * into the +/- (1 << 31) range.
63 struct sja1105_private *priv = ds->priv; in sja1105_hwtstamp_set()
66 if (copy_from_user(&config, ifr->ifr_data, sizeof(config))) in sja1105_hwtstamp_set()
67 return -EFAULT; in sja1105_hwtstamp_set()
71 priv->hwts_tx_en &= ~BIT(port); in sja1105_hwtstamp_set()
74 priv->hwts_tx_en |= BIT(port); in sja1105_hwtstamp_set()
77 return -ERANGE; in sja1105_hwtstamp_set()
82 priv->hwts_rx_en &= ~BIT(port); in sja1105_hwtstamp_set()
85 priv->hwts_rx_en |= BIT(port); in sja1105_hwtstamp_set()
89 if (copy_to_user(ifr->ifr_data, &config, sizeof(config))) in sja1105_hwtstamp_set()
90 return -EFAULT; in sja1105_hwtstamp_set()
96 struct sja1105_private *priv = ds->priv; in sja1105_hwtstamp_get()
100 if (priv->hwts_tx_en & BIT(port)) in sja1105_hwtstamp_get()
104 if (priv->hwts_rx_en & BIT(port)) in sja1105_hwtstamp_get()
109 return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? in sja1105_hwtstamp_get()
110 -EFAULT : 0; in sja1105_hwtstamp_get()
116 struct sja1105_private *priv = ds->priv; in sja1105_get_ts_info()
117 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_get_ts_info()
120 if (!ptp_data->clock) in sja1105_get_ts_info()
121 return -ENODEV; in sja1105_get_ts_info()
123 info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE | in sja1105_get_ts_info()
126 info->tx_types = (1 << HWTSTAMP_TX_OFF) | in sja1105_get_ts_info()
128 info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) | in sja1105_get_ts_info()
130 info->phc_index = ptp_clock_index(ptp_data->clock); in sja1105_get_ts_info()
142 sja1105_packing(buf, &cmd->ptpstrtsch, 30, 30, size, op); in sja1105et_ptp_cmd_packing()
143 sja1105_packing(buf, &cmd->ptpstopsch, 29, 29, size, op); in sja1105et_ptp_cmd_packing()
144 sja1105_packing(buf, &cmd->startptpcp, 28, 28, size, op); in sja1105et_ptp_cmd_packing()
145 sja1105_packing(buf, &cmd->stopptpcp, 27, 27, size, op); in sja1105et_ptp_cmd_packing()
146 sja1105_packing(buf, &cmd->resptp, 2, 2, size, op); in sja1105et_ptp_cmd_packing()
147 sja1105_packing(buf, &cmd->corrclk4ts, 1, 1, size, op); in sja1105et_ptp_cmd_packing()
148 sja1105_packing(buf, &cmd->ptpclkadd, 0, 0, size, op); in sja1105et_ptp_cmd_packing()
159 sja1105_packing(buf, &cmd->ptpstrtsch, 30, 30, size, op); in sja1105pqrs_ptp_cmd_packing()
160 sja1105_packing(buf, &cmd->ptpstopsch, 29, 29, size, op); in sja1105pqrs_ptp_cmd_packing()
161 sja1105_packing(buf, &cmd->startptpcp, 28, 28, size, op); in sja1105pqrs_ptp_cmd_packing()
162 sja1105_packing(buf, &cmd->stopptpcp, 27, 27, size, op); in sja1105pqrs_ptp_cmd_packing()
163 sja1105_packing(buf, &cmd->resptp, 3, 3, size, op); in sja1105pqrs_ptp_cmd_packing()
164 sja1105_packing(buf, &cmd->corrclk4ts, 2, 2, size, op); in sja1105pqrs_ptp_cmd_packing()
165 sja1105_packing(buf, &cmd->ptpclkadd, 0, 0, size, op); in sja1105pqrs_ptp_cmd_packing()
171 const struct sja1105_private *priv = ds->priv; in sja1105_ptp_commit()
172 const struct sja1105_regs *regs = priv->info->regs; in sja1105_ptp_commit()
177 priv->info->ptp_cmd_packing(buf, cmd, PACK); in sja1105_ptp_commit()
179 rc = sja1105_xfer_buf(priv, rw, regs->ptp_control, buf, in sja1105_ptp_commit()
183 priv->info->ptp_cmd_packing(buf, cmd, UNPACK); in sja1105_ptp_commit()
196 * To reconstruct into a full 64-bit-wide timestamp, the cycle counter is
197 * read and the high-order bits are filled in.
205 struct sja1105_private *priv = ds->priv; in sja1105_tstamp_reconstruct()
206 u64 partial_tstamp_mask = CYCLECOUNTER_MASK(priv->info->ptp_ts_bits); in sja1105_tstamp_reconstruct()
216 ts_reconstructed -= (partial_tstamp_mask + 1); in sja1105_tstamp_reconstruct()
222 * for frames sent using management routes.
224 * SJA1105 E/T layout of the 4-byte SPI payload:
228 * +-----+-----+-----+ ^
231 * 24-bit timestamp Update bit
234 * SJA1105 P/Q/R/S layout of the 8-byte SPI payload:
238 * ^ +-----+-----+-----+-----+
241 * Update bit 32-bit timestamp
247 static int sja1105_ptpegr_ts_poll(struct dsa_switch *ds, int port, u64 *ts) in sja1105_ptpegr_ts_poll() argument
249 struct sja1105_private *priv = ds->priv; in sja1105_ptpegr_ts_poll()
250 const struct sja1105_regs *regs = priv->info->regs; in sja1105_ptpegr_ts_poll()
258 rc = sja1105_xfer_buf(priv, SPI_READ, regs->ptpegr_ts[port], in sja1105_ptpegr_ts_poll()
259 packed_buf, priv->info->ptpegr_ts_bytes); in sja1105_ptpegr_ts_poll()
264 priv->info->ptpegr_ts_bytes); in sja1105_ptpegr_ts_poll()
269 } while (--timeout); in sja1105_ptpegr_ts_poll()
272 return -ETIMEDOUT; in sja1105_ptpegr_ts_poll()
274 /* Point the end bit to the second 32-bit word on P/Q/R/S, in sja1105_ptpegr_ts_poll()
275 * no-op on E/T. in sja1105_ptpegr_ts_poll()
277 tstamp_bit_end = (priv->info->ptpegr_ts_bytes - 4) * 8; in sja1105_ptpegr_ts_poll()
278 /* Shift the 24-bit timestamp on E/T to be collected from 31:8. in sja1105_ptpegr_ts_poll()
279 * No-op on P/Q/R/S. in sja1105_ptpegr_ts_poll()
281 tstamp_bit_end += 32 - priv->info->ptp_ts_bits; in sja1105_ptpegr_ts_poll()
282 tstamp_bit_start = tstamp_bit_end + priv->info->ptp_ts_bits - 1; in sja1105_ptpegr_ts_poll()
284 *ts = 0; in sja1105_ptpegr_ts_poll()
286 sja1105_unpack(packed_buf, ts, tstamp_bit_start, tstamp_bit_end, in sja1105_ptpegr_ts_poll()
287 priv->info->ptpegr_ts_bytes); in sja1105_ptpegr_ts_poll()
292 /* Caller must hold ptp_data->lock */
296 const struct sja1105_regs *regs = priv->info->regs; in sja1105_ptpclkval_read()
298 return sja1105_xfer_u64(priv, SPI_READ, regs->ptpclkval, ticks, in sja1105_ptpclkval_read()
302 /* Caller must hold ptp_data->lock */
306 const struct sja1105_regs *regs = priv->info->regs; in sja1105_ptpclkval_write()
308 return sja1105_xfer_u64(priv, SPI_WRITE, regs->ptpclkval, &ticks, in sja1105_ptpclkval_write()
314 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_extts_poll()
315 const struct sja1105_regs *regs = priv->info->regs; in sja1105_extts_poll()
320 rc = sja1105_xfer_u64(priv, SPI_READ, regs->ptpsyncts, &ptpsyncts, in sja1105_extts_poll()
323 dev_err_ratelimited(priv->ds->dev, in sja1105_extts_poll()
326 if (ptpsyncts && ptp_data->ptpsyncts != ptpsyncts) { in sja1105_extts_poll()
330 ptp_clock_event(ptp_data->clock, &event); in sja1105_extts_poll()
332 ptp_data->ptpsyncts = ptpsyncts; in sja1105_extts_poll()
340 struct dsa_switch *ds = priv->ds; in sja1105_rxtstamp_work()
343 mutex_lock(&ptp_data->lock); in sja1105_rxtstamp_work()
345 while ((skb = skb_dequeue(&ptp_data->skb_rxtstamp_queue)) != NULL) { in sja1105_rxtstamp_work()
347 u64 ticks, ts; in sja1105_rxtstamp_work() local
352 dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc); in sja1105_rxtstamp_work()
359 ts = SJA1105_SKB_CB(skb)->tstamp; in sja1105_rxtstamp_work()
360 ts = sja1105_tstamp_reconstruct(ds, ticks, ts); in sja1105_rxtstamp_work()
362 shwt->hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts)); in sja1105_rxtstamp_work()
366 if (ptp_data->extts_enabled) in sja1105_rxtstamp_work()
369 mutex_unlock(&ptp_data->lock); in sja1105_rxtstamp_work()
372 return -1; in sja1105_rxtstamp_work()
377 struct sja1105_private *priv = ds->priv; in sja1105_rxtstamp()
378 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_rxtstamp()
380 if (!(priv->hwts_rx_en & BIT(port))) in sja1105_rxtstamp()
386 skb_queue_tail(&ptp_data->skb_rxtstamp_queue, skb); in sja1105_rxtstamp()
387 ptp_schedule_worker(ptp_data->clock, 0); in sja1105_rxtstamp()
394 u64 ts = SJA1105_SKB_CB(skb)->tstamp; in sja1110_rxtstamp() local
398 shwt->hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts)); in sja1110_rxtstamp()
408 struct sja1105_private *priv = ds->priv; in sja1105_port_rxtstamp()
410 return priv->info->rxtstamp(ds, port, skb); in sja1105_port_rxtstamp()
416 struct sja1105_private *priv = ds->priv; in sja1110_process_meta_tstamp()
417 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1110_process_meta_tstamp()
425 spin_lock(&ptp_data->skb_txtstamp_queue.lock); in sja1110_process_meta_tstamp()
427 skb_queue_walk_safe(&ptp_data->skb_txtstamp_queue, skb, skb_tmp) { in sja1110_process_meta_tstamp()
428 if (SJA1105_SKB_CB(skb)->ts_id != ts_id) in sja1110_process_meta_tstamp()
431 __skb_unlink(skb, &ptp_data->skb_txtstamp_queue); in sja1110_process_meta_tstamp()
437 spin_unlock(&ptp_data->skb_txtstamp_queue.lock); in sja1110_process_meta_tstamp()
452 struct sk_buff *clone = SJA1105_SKB_CB(skb)->clone; in sja1110_txtstamp()
453 struct sja1105_private *priv = ds->priv; in sja1110_txtstamp()
454 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1110_txtstamp()
457 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; in sja1110_txtstamp()
459 spin_lock(&priv->ts_id_lock); in sja1110_txtstamp()
461 ts_id = priv->ts_id; in sja1110_txtstamp()
462 /* Deal automatically with 8-bit wraparound */ in sja1110_txtstamp()
463 priv->ts_id++; in sja1110_txtstamp()
465 SJA1105_SKB_CB(clone)->ts_id = ts_id; in sja1110_txtstamp()
467 spin_unlock(&priv->ts_id_lock); in sja1110_txtstamp()
469 skb_queue_tail(&ptp_data->skb_txtstamp_queue, clone); in sja1110_txtstamp()
478 struct sja1105_private *priv = ds->priv; in sja1105_port_txtstamp()
481 if (!(priv->hwts_tx_en & BIT(port))) in sja1105_port_txtstamp()
488 SJA1105_SKB_CB(skb)->clone = clone; in sja1105_port_txtstamp()
490 if (priv->info->txtstamp) in sja1105_port_txtstamp()
491 priv->info->txtstamp(ds, port, skb); in sja1105_port_txtstamp()
496 struct sja1105_private *priv = ds->priv; in sja1105_ptp_reset()
497 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_ptp_reset()
498 struct sja1105_ptp_cmd cmd = ptp_data->cmd; in sja1105_ptp_reset()
501 mutex_lock(&ptp_data->lock); in sja1105_ptp_reset()
505 dev_dbg(ds->dev, "Resetting PTP clock\n"); in sja1105_ptp_reset()
508 sja1105_tas_clockstep(priv->ds); in sja1105_ptp_reset()
510 mutex_unlock(&ptp_data->lock); in sja1105_ptp_reset()
515 /* Caller must hold ptp_data->lock */
519 struct sja1105_private *priv = ds->priv; in __sja1105_ptp_gettimex()
525 dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc); in __sja1105_ptp_gettimex()
535 struct timespec64 *ts, in sja1105_ptp_gettimex() argument
543 mutex_lock(&ptp_data->lock); in sja1105_ptp_gettimex()
545 rc = __sja1105_ptp_gettimex(priv->ds, &now, ptp_sts); in sja1105_ptp_gettimex()
546 *ts = ns_to_timespec64(now); in sja1105_ptp_gettimex()
548 mutex_unlock(&ptp_data->lock); in sja1105_ptp_gettimex()
553 /* Caller must hold ptp_data->lock */
557 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_ptp_mode_set()
559 if (ptp_data->cmd.ptpclkadd == mode) in sja1105_ptp_mode_set()
562 ptp_data->cmd.ptpclkadd = mode; in sja1105_ptp_mode_set()
564 return sja1105_ptp_commit(priv->ds, &ptp_data->cmd, SPI_WRITE); in sja1105_ptp_mode_set()
571 struct sja1105_private *priv = ds->priv; in __sja1105_ptp_settime()
577 dev_err(priv->ds->dev, "Failed to put PTPCLK in set mode\n"); in __sja1105_ptp_settime()
583 sja1105_tas_clockstep(priv->ds); in __sja1105_ptp_settime()
589 const struct timespec64 *ts) in sja1105_ptp_settime() argument
593 u64 ns = timespec64_to_ns(ts); in sja1105_ptp_settime()
596 mutex_lock(&ptp_data->lock); in sja1105_ptp_settime()
598 rc = __sja1105_ptp_settime(priv->ds, ns, NULL); in sja1105_ptp_settime()
600 mutex_unlock(&ptp_data->lock); in sja1105_ptp_settime()
609 const struct sja1105_regs *regs = priv->info->regs; in sja1105_ptp_adjfine()
617 /* Take a +/- value and re-center it around 2^31. */ in sja1105_ptp_adjfine()
622 mutex_lock(&ptp_data->lock); in sja1105_ptp_adjfine()
624 rc = sja1105_xfer_u32(priv, SPI_WRITE, regs->ptpclkrate, &clkrate32, in sja1105_ptp_adjfine()
627 sja1105_tas_adjfreq(priv->ds); in sja1105_ptp_adjfine()
629 mutex_unlock(&ptp_data->lock); in sja1105_ptp_adjfine()
637 struct sja1105_private *priv = ds->priv; in __sja1105_ptp_adjtime()
643 dev_err(priv->ds->dev, "Failed to put PTPCLK in add mode\n"); in __sja1105_ptp_adjtime()
649 sja1105_tas_clockstep(priv->ds); in __sja1105_ptp_adjtime()
660 mutex_lock(&ptp_data->lock); in sja1105_ptp_adjtime()
662 rc = __sja1105_ptp_adjtime(priv->ds, delta); in sja1105_ptp_adjtime()
664 mutex_unlock(&ptp_data->lock); in sja1105_ptp_adjtime()
674 mod_timer(&ptp_data->extts_timer, expires); in sja1105_ptp_extts_setup_timer()
681 ptp_schedule_worker(ptp_data->clock, 0); in sja1105_ptp_extts_timer()
692 avb = priv->static_config.tables[BLK_IDX_AVB_PARAMS].entries; in sja1105_change_ptp_clk_pin_func()
694 if (priv->info->device_id == SJA1105E_DEVICE_ID || in sja1105_change_ptp_clk_pin_func()
695 priv->info->device_id == SJA1105T_DEVICE_ID || in sja1105_change_ptp_clk_pin_func()
696 avb->cas_master) in sja1105_change_ptp_clk_pin_func()
704 avb->cas_master = (func == PTP_PF_PEROUT); in sja1105_change_ptp_clk_pin_func()
714 * f = ----------------------
721 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_per_out_enable()
722 const struct sja1105_regs *regs = priv->info->regs; in sja1105_per_out_enable()
723 struct sja1105_ptp_cmd cmd = ptp_data->cmd; in sja1105_per_out_enable()
727 if (perout->index != 0) in sja1105_per_out_enable()
728 return -EOPNOTSUPP; in sja1105_per_out_enable()
731 if (perout->flags) in sja1105_per_out_enable()
732 return -EOPNOTSUPP; in sja1105_per_out_enable()
734 mutex_lock(&ptp_data->lock); in sja1105_per_out_enable()
742 .tv_sec = perout->period.sec, in sja1105_per_out_enable()
743 .tv_nsec = perout->period.nsec, in sja1105_per_out_enable()
746 .tv_sec = perout->start.sec, in sja1105_per_out_enable()
747 .tv_nsec = perout->start.nsec, in sja1105_per_out_enable()
760 rc = -ERANGE; in sja1105_per_out_enable()
771 rc = __sja1105_ptp_gettimex(priv->ds, &now, NULL); in sja1105_per_out_enable()
779 rc = sja1105_xfer_u64(priv, SPI_WRITE, regs->ptppinst, in sja1105_per_out_enable()
784 rc = sja1105_xfer_u32(priv, SPI_WRITE, regs->ptppindur, in sja1105_per_out_enable()
795 rc = sja1105_ptp_commit(priv->ds, &cmd, SPI_WRITE); in sja1105_per_out_enable()
798 mutex_unlock(&ptp_data->lock); in sja1105_per_out_enable()
810 if (extts->index != 0) in sja1105_extts_enable()
811 return -EOPNOTSUPP; in sja1105_extts_enable()
814 if (extts->flags & ~(PTP_ENABLE_FEATURE | in sja1105_extts_enable()
818 return -EOPNOTSUPP; in sja1105_extts_enable()
821 if ((extts->flags & PTP_STRICT_FLAGS) && in sja1105_extts_enable()
822 (extts->flags & PTP_ENABLE_FEATURE) && in sja1105_extts_enable()
823 (extts->flags & PTP_EXTTS_EDGES) != PTP_EXTTS_EDGES) in sja1105_extts_enable()
824 return -EOPNOTSUPP; in sja1105_extts_enable()
830 priv->ptp_data.extts_enabled = on; in sja1105_extts_enable()
833 sja1105_ptp_extts_setup_timer(&priv->ptp_data); in sja1105_extts_enable()
835 del_timer_sync(&priv->ptp_data.extts_timer); in sja1105_extts_enable()
845 int rc = -EOPNOTSUPP; in sja1105_ptp_enable()
847 if (req->type == PTP_CLK_REQ_PEROUT) in sja1105_ptp_enable()
848 rc = sja1105_per_out_enable(priv, &req->perout, on); in sja1105_ptp_enable()
849 else if (req->type == PTP_CLK_REQ_EXTTS) in sja1105_ptp_enable()
850 rc = sja1105_extts_enable(priv, &req->extts, on); in sja1105_ptp_enable()
862 return -1; in sja1105_ptp_verify_pin()
869 if (priv->info->device_id == SJA1105E_DEVICE_ID || in sja1105_ptp_verify_pin()
870 priv->info->device_id == SJA1105T_DEVICE_ID) in sja1105_ptp_verify_pin()
871 return -1; in sja1105_ptp_verify_pin()
874 return -1; in sja1105_ptp_verify_pin()
887 struct sja1105_private *priv = ds->priv; in sja1105_ptp_clock_register()
888 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_ptp_clock_register()
890 ptp_data->caps = (struct ptp_clock_info) { in sja1105_ptp_clock_register()
908 skb_queue_head_init(&ptp_data->skb_rxtstamp_queue); in sja1105_ptp_clock_register()
910 skb_queue_head_init(&ptp_data->skb_txtstamp_queue); in sja1105_ptp_clock_register()
912 ptp_data->clock = ptp_clock_register(&ptp_data->caps, ds->dev); in sja1105_ptp_clock_register()
913 if (IS_ERR_OR_NULL(ptp_data->clock)) in sja1105_ptp_clock_register()
914 return PTR_ERR(ptp_data->clock); in sja1105_ptp_clock_register()
916 ptp_data->cmd.corrclk4ts = true; in sja1105_ptp_clock_register()
917 ptp_data->cmd.ptpclkadd = PTP_SET_MODE; in sja1105_ptp_clock_register()
919 timer_setup(&ptp_data->extts_timer, sja1105_ptp_extts_timer, 0); in sja1105_ptp_clock_register()
926 struct sja1105_private *priv = ds->priv; in sja1105_ptp_clock_unregister()
927 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_ptp_clock_unregister()
929 if (IS_ERR_OR_NULL(ptp_data->clock)) in sja1105_ptp_clock_unregister()
932 del_timer_sync(&ptp_data->extts_timer); in sja1105_ptp_clock_unregister()
933 ptp_cancel_worker_sync(ptp_data->clock); in sja1105_ptp_clock_unregister()
934 skb_queue_purge(&ptp_data->skb_txtstamp_queue); in sja1105_ptp_clock_unregister()
935 skb_queue_purge(&ptp_data->skb_rxtstamp_queue); in sja1105_ptp_clock_unregister()
936 ptp_clock_unregister(ptp_data->clock); in sja1105_ptp_clock_unregister()
937 ptp_data->clock = NULL; in sja1105_ptp_clock_unregister()
943 struct sja1105_private *priv = ds->priv; in sja1105_ptp_txtstamp_skb()
944 struct sja1105_ptp_data *ptp_data = &priv->ptp_data; in sja1105_ptp_txtstamp_skb()
946 u64 ticks, ts; in sja1105_ptp_txtstamp_skb() local
949 skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; in sja1105_ptp_txtstamp_skb()
951 mutex_lock(&ptp_data->lock); in sja1105_ptp_txtstamp_skb()
953 rc = sja1105_ptpegr_ts_poll(ds, port, &ts); in sja1105_ptp_txtstamp_skb()
955 dev_err(ds->dev, "timed out polling for tstamp\n"); in sja1105_ptp_txtstamp_skb()
962 dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc); in sja1105_ptp_txtstamp_skb()
967 ts = sja1105_tstamp_reconstruct(ds, ticks, ts); in sja1105_ptp_txtstamp_skb()
969 shwt.hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts)); in sja1105_ptp_txtstamp_skb()
973 mutex_unlock(&ptp_data->lock); in sja1105_ptp_txtstamp_skb()