[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210510153433.224723-1-radu-nicolae.pirea@oss.nxp.com>
Date: Mon, 10 May 2021 18:34:31 +0300
From: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
To: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, kuba@...nel.org, richardcochran@...il.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
"Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
Subject: [PATCH v2 0/2] Add PTP support for TJA1103
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.
Changes v2:
- added unlocked version for the functions nxp_c45_ptp_settime64 and
nxp_c45_ptp_gettimex64
- use only one lock for .gettimex64 and .settime64
- added the same lock for .adjfine, .adjtime and nxp_c45_get_hwtxts
- moved the reading of the hw ts outside of the loop where the RX ts are
reconstructed
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 | 531 +++++++++++++++++++++++++++++-
drivers/ptp/ptp_clock.c | 21 --
include/linux/ptp_clock_kernel.h | 34 +-
3 files changed, 556 insertions(+), 30 deletions(-)
--
2.31.1
Powered by blists - more mailing lists