====================
PTP support for the SJA1105 DSA driver
This patchset adds the following:
- A timecounter/cyclecounter based PHC for the free-running
timestamping clock of this switch.
- A state machine implemented in the DSA tagger for SJA1105, which
keeps track of metadata follow-up Ethernet frames (the switch's way
of transmitting RX timestamps).
Clock manipulations on the actual hardware PTP clock will have to be
implemented anyway, for the TTEthernet block and the time-based ingress
policer.
v3 patchset can be found at:
https://lkml.org/lkml/2019/6/4/954
Changes from v3:
- Made it compile with the SJA1105 DSA driver and PTP driver as modules.
- Reworked/simplified/fixed some issues in 03/17
(dsa_8021q_remove_header) and added an ASCII image that
illustrates the transformation that is taking place.
- Removed a useless check for sja1105_is_link_local from 16/17 (RX
timestamping) which also made previous 08/17 patch ("Move
sja1105_is_link_local to include/linux") useless and therefore dropped.
v2 patchset can be found at:
https://lkml.org/lkml/2019/6/2/146
Changes from v2:
- Broke previous 09/10 patch (timestamping) into multiple smaller
patches.
- Every patch in the series compiles.
v1 patchset can be found at:
https://lkml.org/lkml/2019/5/28/1093
Changes from v1:
- Removed the addition of the DSA .can_timestamp callback.
- Waiting for meta frames is done completely inside the tagger, and all
frames emitted on RX are already partially timestamped.
- Added a global data structure for the tagger common to all ports.
- Made PTP work with ports in standalone mode, by limiting use of the
DMAC-mangling "incl_srcpt" mode only when ports are bridged, aka when
the DSA master is already promiscuous and can receive anything.
Also changed meta frames to be sent at the 01-80-C2-00-00-0E DMAC.
- Made some progress w.r.t. observed negative path delay. Apparently it
only appears when the delay mechanism is the delay request-response
(end-to-end) one. If peer delay is used (-P), the path delay is
positive and appears reasonable for an 1000Base-T link (485 ns in
steady state).