Skip to content

Support programmable pins for Ocelot PTP driver

Yangbo Lu lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyIn review
  2. v27 patches 2 repliesSuperseded
  3. v16 patches 18 repliesSuperseded

Changes in v3 from the cover letter

- Re-sent.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net: mscc: ocelot: move ocelot ptp clock code out of ocelot.cdrivers/net/dsa/ocelot/felix.c drivers/net/ethernet/mscc/Makefile drivers/net/ethernet/mscc/ocelot.c +5 more+266 -2100 replies
2/7net: mscc: ocelot: fix timestamp info if ptp clock does not workdrivers/net/ethernet/mscc/ocelot.c+6 -00 replies
3/7net: mscc: ocelot: redefine PTP pinsinclude/soc/mscc/ocelot.h+5 -40 replies
4/7net: mscc: ocelot: add wave programming registers definitionsdrivers/net/dsa/ocelot/felix_vsc9959.c drivers/net/ethernet/mscc/ocelot_regs.c include/soc/mscc/ocelot.h +1 more+8 -00 replies
5/7net: mscc: ocelot: support 4 PTP programmable pinsdrivers/net/ethernet/mscc/ocelot_ptp.c include/soc/mscc/ocelot.h include/soc/mscc/ocelot_ptp.h+128 -00 replies
6/7net: mscc: ocelot: enable PTP programmable pindrivers/net/ethernet/mscc/ocelot_board.c+4 -20 replies
7/7net: dsa: felix: enable PTP programmable pindrivers/net/dsa/ocelot/felix.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [v3, 0/7] Support programmable pins for Ocelot PTP driver

The Ocelot PTP clock driver had been embedded into ocelot.c driver. It had supported basic gettime64/settime64/adjtime/adjfine functions by now which were used by both Ocelot switch and Felix switch.

This patch-set is to move current ptp clock code out of ocelot.c driver maintaining as a single ocelot_ptp.c driver, and to implement 4 programmable pins with only PTP_PF_PEROUT function for now.
The PTP_PF_EXTTS function will be supported in the future, and it should be implemented separately for Felix and Ocelot, because of different hardware interrupt implementation in them.
---
Changes for v2:
- Put PTP driver under drivers/net/ethernet/mscc/.
- Dropped MAINTAINERS patch. Kept original maintaining.
- Initialized PTP separately in ocelot/felix platforms.
- Supported PPS case in programmable pin.
- Supported disabling pin function since deadlock is fixed by Richard.
- Returned -EBUSY if not finding pin available.
Changes for v3:
- Re-sent.

Yangbo Lu (7):
net: mscc: ocelot: move ocelot ptp clock code out of ocelot.c
net: mscc: ocelot: fix timestamp info if ptp clock does not work
net: mscc: ocelot: redefine PTP pins
net: mscc: ocelot: add wave programming registers definitions
net: mscc: ocelot: support 4 PTP programmable pins
net: mscc: ocelot: enable PTP programmable pin
net: dsa: felix: enable PTP programmable pin

 drivers/net/dsa/ocelot/felix.c                     |  27 ++
 drivers/net/dsa/ocelot/felix_vsc9959.c             |   2 +
 drivers/net/ethernet/mscc/Makefile                 |   2 +-
 drivers/net/ethernet/mscc/ocelot.c                 | 212 +-------------
 drivers/net/ethernet/mscc/ocelot.h                 |   3 +-
 drivers/net/ethernet/mscc/ocelot_board.c           |  27 ++
 drivers/net/ethernet/mscc/ocelot_ptp.c             | 324 +++++++++++++++++++++
 drivers/net/ethernet/mscc/ocelot_regs.c            |   2 +
 include/soc/mscc/ocelot.h                          |  15 +-
 .../net/ethernet => include/soc}/mscc/ocelot_ptp.h |  17 ++
 10 files changed, 417 insertions(+), 214 deletions(-)
 create mode 100644 drivers/net/ethernet/mscc/ocelot_ptp.c
 rename {drivers/net/ethernet => include/soc}/mscc/ocelot_ptp.h (52%)
Signature · 1 line
2.7.4