mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-28 20:03:05 +00:00
net: enetc: add PTP synchronization support for ENETC v4
Regarding PTP, ENETC v4 has some changes compared to ENETC v1 (LS1028A), mainly as follows. 1. ENETC v4 uses a different PTP driver, so the way to get phc_index is different from LS1028A. Therefore, enetc_get_ts_info() has been modified appropriately to be compatible with ENETC v1 and v4. 2. The PMa_SINGLE_STEP register has changed in ENETC v4, not only the register offset, but also some register fields. Therefore, two helper functions are added, enetc_set_one_step_ts() for ENETC v1 and enetc4_set_one_step_ts() for ENETC v4. 3. Since the generic helper functions from ptp_clock are used to get the PHC index of the PTP clock, so FSL_ENETC_CORE depends on Kconfig symbol "PTP_1588_CLOCK_OPTIONAL". But FSL_ENETC_CORE can only be selected, so add the dependency to FSL_ENETC, FSL_ENETC_VF and NXP_ENETC4. Perhaps the best approach would be to change FSL_ENETC_CORE to a visible menu entry. Then make FSL_ENETC, FSL_ENETC_VF, and NXP_ENETC4 depend on it, but this is not the goal of this patch, so this may be changed in the future. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250829050615.1247468-14-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
7776d5e6e3
commit
f5b9a1cde0
6 changed files with 129 additions and 22 deletions
Loading…
Add table
Add a link
Reference in a new issue