mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-20 13:24:17 -04:00
NETC V4 Timer provides current time with nanosecond resolution, precise periodic pulse, pulse on timeout (alarm), and time capture on external pulse support. And it supports time synchronization as required for IEEE 1588 and IEEE 802.1AS-2020. Inside NETC, ENETC can capture the timestamp of the sent/received packet through the PHC provided by the Timer and record it on the Tx/Rx BD. And through the relevant PHC interfaces provided by the driver, the enetc V4 driver can support PTP time synchronization. In addition, NETC V4 Timer is similar to the QorIQ 1588 timer, but it is not exactly the same. The current ptp-qoriq driver is not compatible with NETC V4 Timer, most of the code cannot be reused, see below reasons. 1. The architecture of ptp-qoriq driver makes the register offset fixed, however, the offsets of all the high registers and low registers of V4 are swapped, and V4 also adds some new registers. so extending ptp-qoriq to make it compatible with V4 Timer is tantamount to completely rewriting ptp-qoriq driver. 2. The usage of some functions is somewhat different from QorIQ timer, such as the setting of TCLK_PERIOD and TMR_ADD, the logic of configuring PPS, etc., so making the driver compatible with V4 Timer will undoubtedly increase the complexity of the code and reduce readability. 3. QorIQ is an expired brand. It is difficult for us to verify whether it works stably on the QorIQ platforms if we refactor the driver, and this will make maintenance difficult, so refactoring the driver obviously does not bring any benefits. Therefore, add this new driver for NETC V4 Timer. Note that the missing features like PEROUT, PPS and EXTTS will be added in subsequent patches. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250829050615.1247468-5-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
27 lines
1.1 KiB
Makefile
27 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for PTP 1588 clock support.
|
|
#
|
|
|
|
ptp-y := ptp_clock.o ptp_chardev.o ptp_sysfs.o ptp_vclock.o
|
|
ptp_kvm-$(CONFIG_X86) := ptp_kvm_x86.o ptp_kvm_common.o
|
|
ptp_kvm-$(CONFIG_HAVE_ARM_SMCCC) := ptp_kvm_arm.o ptp_kvm_common.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK) += ptp.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_DTE) += ptp_dte.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_INES) += ptp_ines.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_PCH) += ptp_pch.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_KVM) += ptp_kvm.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_VMCLOCK) += ptp_vmclock.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_QORIQ) += ptp-qoriq.o
|
|
ptp-qoriq-y += ptp_qoriq.o
|
|
ptp-qoriq-$(CONFIG_DEBUG_FS) += ptp_qoriq_debugfs.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_IDTCM) += ptp_clockmatrix.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_FC3W) += ptp_fc3.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_IDT82P33) += ptp_idt82p33.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_MOCK) += ptp_mock.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_VMW) += ptp_vmw.o
|
|
obj-$(CONFIG_PTP_1588_CLOCK_OCP) += ptp_ocp.o
|
|
obj-$(CONFIG_PTP_DFL_TOD) += ptp_dfl_tod.o
|
|
obj-$(CONFIG_PTP_S390) += ptp_s390.o
|
|
obj-$(CONFIG_PTP_NETC_V4_TIMER) += ptp_netc.o
|