lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v1 0/2] Add PTP support for TJA1103
Date
Hi,

This is the PTP support for TJA1103.
The RX timestamp is found in the reserved2 field of the PTP package.
The TX timestamp has to be read from the phy registers. Reading of the
timestamp works with interrupts or with polling(that starts when
.nxp_c45_txtstamp is called).
The implementation of .adjtime is done by read modify write because there
is no way to atomically add/subtract a constant from the clock value.

I've moved scaled_ppm_to_ppb function from ptp_clock.c to
ptp_clock_kernel.h in order to be able to build the driver without
PTP_1588_CLOCK=y.

Radu P.

Radu Pirea (NXP OSS) (2):
ptp: ptp_clock: make scaled_ppm_to_ppb static inline
phy: nxp-c45-tja11xx: add timestamping support

drivers/net/phy/nxp-c45-tja11xx.c | 505 +++++++++++++++++++++++++++++-
drivers/ptp/ptp_clock.c | 21 --
include/linux/ptp_clock_kernel.h | 34 +-
3 files changed, 530 insertions(+), 30 deletions(-)

--
2.31.1

\
 
 \ /
  Last update: 2021-04-28 14:31    [W:0.057 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site