]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: cn10k: add support for new ptp timestamp format
authorNaveen Mamindlapalli <naveenm@marvell.com>
Mon, 21 Feb 2022 06:45:07 +0000 (12:15 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Feb 2022 13:07:48 +0000 (13:07 +0000)
commit453d6ae77478371058043edf415c129a9a77f983
tree3e31832cad08f19e22fb5f366702d8f2c94cb7cd
parent9b10e2aaebcc0bf69c0497e42304877e9274477f
octeontx2-pf: cn10k: add support for new ptp timestamp format

The cn10k hardware ptp timestamp format has been modified primarily
to support 1-step ptp clock. The 64-bit timestamp used by hardware is
split into two 32-bit fields, the upper one holds seconds, the lower
one nanoseconds. A new register (PTP_CLOCK_SEC) has been added that
returns the current seconds value. The nanoseconds register PTP_CLOCK_HI
resets after every second. The cn10k RPM block provides Rx/Tx timestamps
to the NIX block using the new timestamp format. The software can read
the current timestamp in nanoseconds by reading both PTP_CLOCK_SEC &
PTP_CLOCK_HI registers.

This patch provides support for new timestamp format.

Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Rakesh Babu Saladi <rsaladi2@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/ptp.c
drivers/net/ethernet/marvell/octeontx2/af/ptp.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c