summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/hirschmann/Makefile
diff options
context:
space:
mode:
authorKamil Alkhouri <kamil.alkhouri@hs-offenburg.de>2020-11-03 08:10:58 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-05 14:04:49 -0800
commitf0d4ba9eff75a79fccb7793f4d9f12303d458603 (patch)
treea429e4c4e9c6b3828be46d2a4f8086419981d24c /drivers/net/dsa/hirschmann/Makefile
parentddd56dfe52c987d82964595902db0600970ef406 (diff)
net: dsa: hellcreek: Add support for hardware timestamping
The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX The switch has a single register per port to capture a timestamp. That mechanism is not used due to correlation problems. If the software processing is too slow and a PTPv2 event message is received before the previous one has been processed, false timestamps will be captured. Therefore, the switch can do "inline" timestamping which means it can insert the nanoseconds part of the timestamp directly into the PTPv2 event message. The reserved field (4 bytes) is leveraged for that. This might not be in accordance with (older) PTP standards, but is the only way to get reliable results. * TX In Tx direction there is no correlation problem, because the software and the driver has to ensure that only one event message is "on the fly". However, the switch provides also a mechanism to check whether a timestamp is lost. That can only happen when a timestamp is read and at this point another message is timestamped. So, that lost bit is checked just in case to indicate to the user that the driver or the software is somewhat buggy. Signed-off-by: Kamil Alkhouri <kamil.alkhouri@hs-offenburg.de> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/hirschmann/Makefile')
-rw-r--r--drivers/net/dsa/hirschmann/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/hirschmann/Makefile b/drivers/net/dsa/hirschmann/Makefile
index 39de02a03640..f4075c2998b5 100644
--- a/drivers/net/dsa/hirschmann/Makefile
+++ b/drivers/net/dsa/hirschmann/Makefile
@@ -2,3 +2,4 @@
obj-$(CONFIG_NET_DSA_HIRSCHMANN_HELLCREEK) += hellcreek_sw.o
hellcreek_sw-objs := hellcreek.o
hellcreek_sw-objs += hellcreek_ptp.o
+hellcreek_sw-objs += hellcreek_hwtstamp.o