mbox series

[0/5] Support PTP clock and hardware timestamping for DSA Felix driver

Message ID 20191120082318.3909-1-yangbo.lu@nxp.com
Headers show
Series Support PTP clock and hardware timestamping for DSA Felix driver | expand

Message

Yangbo Lu Nov. 20, 2019, 8:23 a.m. UTC
This patch-set is to support PTP clock and hardware timestamping
for DSA Felix driver. Some functions in ocelot.c/ocelot_board.c
driver were reworked/exported, so that DSA Felix driver was able
to reuse them as much as possible.

On TX path, timestamping works on packet which requires timestamp.
The injection header will be configured accordingly, and skb clone
requires timestamp will be added into a list. The TX timestamp
is final handled in threaded interrupt handler when PTP timestamp
FIFO is ready.
On RX path, timestamping is always working. The RX timestamp could
be got from extraction header.

Yangbo Lu (5):
  net: mscc: ocelot: export ocelot_hwstamp_get/set functions
  net: mscc: ocelot: convert to use ocelot_get_txtstamp()
  net: mscc: ocelot: convert to use ocelot_port_add_txtstamp_skb()
  net: dsa: ocelot: define PTP registers for felix_vsc9959
  net: dsa: ocelot: add hardware timestamping support for Felix

 drivers/net/dsa/ocelot/felix.c           |  89 ++++++++++++++++++++++++
 drivers/net/dsa/ocelot/felix_vsc9959.c   |  16 +++++
 drivers/net/ethernet/mscc/ocelot.c       | 113 +++++++++++++++++++++++++------
 drivers/net/ethernet/mscc/ocelot.h       |   6 --
 drivers/net/ethernet/mscc/ocelot_board.c |  53 +--------------
 include/soc/mscc/ocelot.h                |  13 +++-
 net/dsa/tag_ocelot.c                     |  14 +++-
 7 files changed, 222 insertions(+), 82 deletions(-)

Comments

David Miller Nov. 21, 2019, 10:39 p.m. UTC | #1
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Wed, 20 Nov 2019 16:23:13 +0800

> This patch-set is to support PTP clock and hardware timestamping
> for DSA Felix driver. Some functions in ocelot.c/ocelot_board.c
> driver were reworked/exported, so that DSA Felix driver was able
> to reuse them as much as possible.
> 
> On TX path, timestamping works on packet which requires timestamp.
> The injection header will be configured accordingly, and skb clone
> requires timestamp will be added into a list. The TX timestamp
> is final handled in threaded interrupt handler when PTP timestamp
> FIFO is ready.
> On RX path, timestamping is always working. The RX timestamp could
> be got from extraction header.

Series applied, thank you.