net: Add a layer for non-PHY MII time stamping drivers.
Subsystems (3)
PATCH v2 3/5 net: Add a layer for non-PHY MII time stamping drivers.
While PHY time stamping drivers can simply attach their interface directly to the PHY instance, stand alone drivers require support in order to manage their services. Non-PHY MII time stamping drivers have a control interface over another bus like I2C, SPI, UART, or via a memory mapped peripheral. The controller device will be associated with one or more time stamping channels, each of which sits snoops in on a MII bus.
This patch provides a glue layer that will enable time stamping channels to find their controlling device.
Signed-off-by Richard Cochran <[email protected]>
--- drivers/net/phy/Makefile | 2 + drivers/net/phy/mii_timestamper.c | 121 ++++++++++++++++++++++++++++++++++++++ include/linux/mii_timestamper.h | 63 ++++++++++++++++++++ net/Kconfig | 7 ++- 4 files changed, 190 insertions(+), 3 deletions(-) create mode 100644 drivers/net/phy/mii_timestamper.c
drivers/net/phy/Makefile +2 -0
@@ -40,6 +40,8 @@ obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o obj-$(CONFIG_MDIO_THUNDER) += mdio-thunder.o obj-$(CONFIG_MDIO_XGENE) += mdio-xgene.o +obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += mii_timestamper.o + obj-$(CONFIG_SFP) += sfp.o sfp-obj-$(CONFIG_SFP) += sfp-bus.o obj-y += $(sfp-obj-y) $(sfp-obj-m)
drivers/net/phy/mii_timestamper.c new file +121 -0
121 lines not on this page · raw message
include/linux/mii_timestamper.h +63 -0
79 lines not on this page · raw message
net/Kconfig +4 -3
@@ -106,9 +106,10 @@ config NETWORK_PHY_TIMESTAMPING bool "Timestamping in PHY devices" select NET_PTP_CLASSIFY help - This allows timestamping of network packets by PHYs with - hardware timestamping capabilities. This option adds some - overhead in the transmit and receive paths. + This allows timestamping of network packets by PHYs (or + other MII bus snooping devices) with hardware timestamping + capabilities. This option adds some overhead in the transmit + and receive paths. If you are unsure how to answer this question, answer N.
Signature · 1 line
2.11.0