Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock
From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-09-28 16:56:49
Also in:
lkml
On Thu, Sep 28, 2017 at 10:25:34AM -0500, Brandon Streiff wrote:
quoted hunk ↗ jump to hunk
This patch adds basic support for exposing the 32-bit timestamp counter inside the mv88e6xxx switch code as a ptp_clock. Signed-off-by: Brandon Streiff <redacted> --- drivers/net/dsa/mv88e6xxx/Kconfig | 10 +++ drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 20 +++++ drivers/net/dsa/mv88e6xxx/chip.h | 16 ++++ drivers/net/dsa/mv88e6xxx/ptp.c | 180 +++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/ptp.h | 83 +++++++++++++++++ 6 files changed, 310 insertions(+) create mode 100644 drivers/net/dsa/mv88e6xxx/ptp.c create mode 100644 drivers/net/dsa/mv88e6xxx/ptp.hdiff --git a/drivers/net/dsa/mv88e6xxx/Kconfig b/drivers/net/dsa/mv88e6xxx/Kconfig index 1aaa7a9..ae9e7f7 100644 --- a/drivers/net/dsa/mv88e6xxx/Kconfig +++ b/drivers/net/dsa/mv88e6xxx/Kconfig@@ -18,3 +18,13 @@ config NET_DSA_MV88E6XXX_GLOBAL2 It is required on most chips. If the chip you compile the support for doesn't have such registers set, say N here. In doubt, say Y. + +config NET_DSA_MV88E6XXX_PTP + bool "PTP support for Marvell 88E6xxx" + default n + depends on NET_DSA_MV88E6XXX_GLOBAL2 + imply NETWORK_PHY_TIMESTAMPING
Hi Brandon Cool to see this code. One probably dumb question so far.. It is the MAC which is doing the time stamping, not they PHY? So why NETWORK_PHY_TIMESTAMPING? Andrew