netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/10] PTP support for DSA and mv88e6xxx driver.
@ 2018-02-03 21:40 Andrew Lunn
  2018-02-03 21:40 ` [RFC PATCH 01/10] net: ptp: Add stub for ptp_classify_raw() Andrew Lunn
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Andrew Lunn @ 2018-02-03 21:40 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Vivien Didelot, sean.wang, Woojung.Huh, john,
	jbe, richardcochran, Andrew Lunn

This patchset adds support for using the PTP hardware in switches
supported by the mv88e6xxx driver. The code was produces in
collaboration with Brandon Streiff doing the initial implementation,
and then Richard Cochran and Andrew Lunn making further changes and
cleanups.

The code is sufficient to use ptp4l on a single DSA interface, either
as a master or a slave. Due to the use of an MDIO bus to access the
switch, reading hardware timestamps is slower than what ptp4l
expects. Thus it is necessary to use the option
--tx_timestamp_timeout=32. Heavy use of ethtool -S, or bridge fdb show
can also upset ptp4l. Patches to address this will follow.

Further work is requires to support bridges using Boundary Clock or
Transparent Clock mode.

Since netdev is closed at the moment, i'm seeking comments from other
DSA driver writers if the common infrastructure added here will work
for other switches which DSA support.

Thanks
	Andrew


Andrew Lunn (1):
  net: ptp: Add stub for ptp_classify_raw()

Brandon Streiff (9):
  net: dsa: mv88e6xxx: export g2 register accessors
  net: dsa: mv88e6xxx: add accessors for PTP/TAI registers
  net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock
  net: dsa: mv88e6xxx: add support for GPIO configuration
  net: dsa: mv88e6xxx: add support for event capture
  net: dsa: forward hardware timestamping ioctls to switch driver
  net: dsa: forward timestamping callbacks to switch drivers
  net: dsa: mv88e6xxx: add rx/tx timestamping support
  net: dsa: mv88e6xxx: add workaround for 6341 timestamping

 drivers/net/dsa/mv88e6xxx/Kconfig           |  10 +
 drivers/net/dsa/mv88e6xxx/Makefile          |   4 +
 drivers/net/dsa/mv88e6xxx/chip.c            |  67 ++++
 drivers/net/dsa/mv88e6xxx/chip.h            | 103 +++++
 drivers/net/dsa/mv88e6xxx/global2.c         |   9 +-
 drivers/net/dsa/mv88e6xxx/global2.h         |  85 +++-
 drivers/net/dsa/mv88e6xxx/global2_avb.c     | 193 +++++++++
 drivers/net/dsa/mv88e6xxx/global2_scratch.c | 240 ++++++++++++
 drivers/net/dsa/mv88e6xxx/hwtstamp.c        | 584 ++++++++++++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/hwtstamp.h        | 172 ++++++++
 drivers/net/dsa/mv88e6xxx/ptp.c             | 380 ++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/ptp.h             | 108 +++++
 include/linux/ptp_classify.h                |   4 +
 include/net/dsa.h                           |  20 +
 net/dsa/dsa.c                               |  36 ++
 net/dsa/slave.c                             |  59 +++
 16 files changed, 2069 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/dsa/mv88e6xxx/global2_avb.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/global2_scratch.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/hwtstamp.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/hwtstamp.h
 create mode 100644 drivers/net/dsa/mv88e6xxx/ptp.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/ptp.h

-- 
2.15.1

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-02-09 21:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-03 21:40 [RFC PATCH 00/10] PTP support for DSA and mv88e6xxx driver Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 01/10] net: ptp: Add stub for ptp_classify_raw() Andrew Lunn
2018-02-04  9:34   ` Sergei Shtylyov
2018-02-03 21:40 ` [RFC PATCH 02/10] net: dsa: mv88e6xxx: export g2 register accessors Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 03/10] net: dsa: mv88e6xxx: add accessors for PTP/TAI registers Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 04/10] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Andrew Lunn
2018-02-09 20:33   ` Richard Cochran
2018-02-09 21:04     ` Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 05/10] net: dsa: mv88e6xxx: add support for GPIO configuration Andrew Lunn
2018-02-04 19:53   ` Florian Fainelli
2018-02-04 20:17     ` Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 06/10] net: dsa: mv88e6xxx: add support for event capture Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 07/10] net: dsa: forward hardware timestamping ioctls to switch driver Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 08/10] net: dsa: forward timestamping callbacks to switch drivers Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 09/10] net: dsa: mv88e6xxx: add rx/tx timestamping support Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 10/10] net: dsa: mv88e6xxx: add workaround for 6341 timestamping Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 11/12] net: dsa: mv88e6xxx: Release mutex between each statistics read Andrew Lunn
2018-02-03 21:40 ` [RFC PATCH 12/12] net: dsa: mv88e6xxx: Release mutex between each ATU read Andrew Lunn
2018-02-06 19:44 ` [RFC PATCH 00/10] PTP support for DSA and mv88e6xxx driver Brandon Streiff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).