All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next,v2 0/7] net: renesas: Cleanup usage of gPTP flags
@ 2025-11-04 22:24 Niklas Söderlund
  2025-11-04 22:24 ` [net-next,v2 1/7] net: rswitch: Move definition of S4 gPTP offset Niklas Söderlund
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Niklas Söderlund @ 2025-11-04 22:24 UTC (permalink / raw)
  To: Paul Barker, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Yoshihiro Shimoda,
	Geert Uytterhoeven, Magnus Damm, Richard Cochran, netdev,
	linux-renesas-soc
  Cc: Niklas Söderlund

Hello,

This series aim is to prepare for future work that will enable the use
of gPTP on R-Car RAVB on Gen4. Currently RAVB have a dedicated gPTP
implementation supported on Gen2 and Gen3 (ravb_ptp.c). For Gen4 a new
implementation that is already upstream (rcar_gen4_ptp.c) and used by
other Gen4 devices such as RTSN and RSWITCH is needed.

Unfortunately the design of the Gen2/Gen3 RAVB driver where driver
specific flags to control gPTP behavior have been mimicked in RTSN and
RSWITCH. This was OK as there was no overlap between the two gPTP
implementations. Now that RAVB needs to be able to use both having to
translate between driver specific flags and common net code flags
becomes even more cumbersome as there are two sets of driver specific
flags to pick from.

This series cleans this up for all Renesas drivers using gPTP by
removing all driver specific flags and using the common flags directly.
This simplifies drivers while at the same time prepare RAVB to be
extended with Gen4 support.

Patch 1/7 is a drive by patch where RSWITCH specific define was added in
the wrong header. Patch 2/7 removes a short-cut used in RTSN and RSWITCH
that prevents extending Gen4 support to RAVB without fuss. While patch
3/7 to 7/7 rework the Renesas drivers to use the common flags instead of
driver specific ones.

There is no intentional behavior change and only a small rework in logic
in the RAVB driver. Looking at patch 3/7, 4/7 and 7/7 one can clearly
see how the code have been copied from RAVB to the later implementations
in RTSN and RSWITCH.

The delay between v1 and v2 of this series is due to lots of nice work 
by Vadim Fedorenko converting lots of drivers to the ndo_hwtstamp API, 
including these ones and I did not want to cause conflicts with that 
work. This series have been rebased on-top of that work that is now in 
net-next.

Niklas Söderlund (7):
  net: rswitch: Move definition of S4 gPTP offset
  net: rcar_gen4_ptp: Move control fields to users
  net: rswitch: Use common defines for time stamping control
  net: rtsn: Use common defines for time stamping control
  net: rcar_gen4_ptp: Remove unused defines
  net: ravb: Break out Rx hardware timestamping
  net: ravb: Use common defines for time stamping control

 drivers/net/ethernet/renesas/ravb.h          | 14 +---
 drivers/net/ethernet/renesas/ravb_main.c     | 67 ++++++++++----------
 drivers/net/ethernet/renesas/rcar_gen4_ptp.h | 13 ----
 drivers/net/ethernet/renesas/rswitch.h       |  3 +
 drivers/net/ethernet/renesas/rswitch_main.c  | 43 ++++---------
 drivers/net/ethernet/renesas/rtsn.c          | 47 ++++----------
 6 files changed, 64 insertions(+), 123 deletions(-)

-- 
2.51.1


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

end of thread, other threads:[~2025-11-07 19:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 22:24 [net-next,v2 0/7] net: renesas: Cleanup usage of gPTP flags Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 1/7] net: rswitch: Move definition of S4 gPTP offset Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 2/7] net: rcar_gen4_ptp: Move control fields to users Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 3/7] net: rswitch: Use common defines for time stamping control Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 4/7] net: rtsn: " Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 5/7] net: rcar_gen4_ptp: Remove unused defines Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 6/7] net: ravb: Break out Rx hardware timestamping Niklas Söderlund
2025-11-04 22:24 ` [net-next,v2 7/7] net: ravb: Use common defines for time stamping control Niklas Söderlund
2025-11-07 17:50   ` Simon Horman
2025-11-07 19:10     ` Niklas Söderlund
2025-11-07  1:50 ` [net-next,v2 0/7] net: renesas: Cleanup usage of gPTP flags patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.