]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-af: Add support for Marvell PTP coprocessor
authorAleksey Makarov <amakarov@marvell.com>
Mon, 24 Aug 2020 15:50:01 +0000 (21:20 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Aug 2020 01:15:45 +0000 (18:15 -0700)
commit59da00d8025e1370e0238ee3d9c2984391e516e2
tree7784046b25e49c1e9f9c46d86748f5ab14f4683e
parent66504f0505e39e71421a170ac81a0f41aac30921
octeontx2-af: Add support for Marvell PTP coprocessor

Precision Timestamping block found on Octeontx2
platform is an independent coprocessor and has
internal PTP hardware clock. Once configured PTP
runs independently and when a packet arrives
CGX hardware block gets the current timestamp
from PTP block and forwards the packet to NIX
by prepending timestamp to the packet.
This patch adds the pci driver for PTP block.
The driver gets registered by AF driver and does
initial configuration and exposes a mailbox function to
read and adjust PTP hardware clock. The mailbox function
is called by AF consumers like netdev drivers or
userspace drivers. Since PTP being a single block
in platform this driver helps in accessing PTP
block by any AF consumer.

Co-developed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Aleksey Makarov <amakarov@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/Makefile
drivers/net/ethernet/marvell/octeontx2/af/mbox.h
drivers/net/ethernet/marvell/octeontx2/af/ptp.c [new file with mode: 0644]
drivers/net/ethernet/marvell/octeontx2/af/ptp.h [new file with mode: 0644]
drivers/net/ethernet/marvell/octeontx2/af/rvu.c
drivers/net/ethernet/marvell/octeontx2/af/rvu.h