Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741710

Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock
Date 2017-09-28 19:00 +0200
Message-ID <uuKki-2Zx-17@gated-at.bofh.it> (permalink)
References <uuIVb-2ep-3@gated-at.bofh.it> <uuJ4T-2hz-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 28, 2017 at 10:25:34AM -0500, Brandon Streiff wrote:
> This patch adds basic support for exposing the 32-bit timestamp counter
> inside the mv88e6xxx switch code as a ptp_clock.
> 
> Signed-off-by: Brandon Streiff <brandon.streiff@ni.com>
> ---
>  drivers/net/dsa/mv88e6xxx/Kconfig  |  10 +++
>  drivers/net/dsa/mv88e6xxx/Makefile |   1 +
>  drivers/net/dsa/mv88e6xxx/chip.c   |  20 +++++
>  drivers/net/dsa/mv88e6xxx/chip.h   |  16 ++++
>  drivers/net/dsa/mv88e6xxx/ptp.c    | 180 +++++++++++++++++++++++++++++++++++++
>  drivers/net/dsa/mv88e6xxx/ptp.h    |  83 +++++++++++++++++
>  6 files changed, 310 insertions(+)
>  create mode 100644 drivers/net/dsa/mv88e6xxx/ptp.c
>  create mode 100644 drivers/net/dsa/mv88e6xxx/ptp.h
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/Kconfig b/drivers/net/dsa/mv88e6xxx/Kconfig
> index 1aaa7a9..ae9e7f7 100644
> --- a/drivers/net/dsa/mv88e6xxx/Kconfig
> +++ b/drivers/net/dsa/mv88e6xxx/Kconfig
> @@ -18,3 +18,13 @@ config NET_DSA_MV88E6XXX_GLOBAL2
>  
>  	  It is required on most chips. If the chip you compile the support for
>  	  doesn't have such registers set, say N here. In doubt, say Y.
> +
> +config NET_DSA_MV88E6XXX_PTP
> +	bool "PTP support for Marvell 88E6xxx"
> +	default n
> +	depends on NET_DSA_MV88E6XXX_GLOBAL2
> +	imply NETWORK_PHY_TIMESTAMPING

Hi Brandon

Cool to see this code.

One probably dumb question so far..

It is the MAC which is doing the time stamping, not they PHY?
So why NETWORK_PHY_TIMESTAMPING?

   Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Brandon Streiff <brandon.streiff@ni.com> - 2017-09-28 17:40 +0200
  [PATCH net-next RFC 4/9] net: dsa: mv88e6xxx: add support for event capture Brandon Streiff <brandon.streiff@ni.com> - 2017-09-28 17:40 +0200
  [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Brandon Streiff <brandon.streiff@ni.com> - 2017-09-28 17:40 +0200
    Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time  as a PTP hardware clock Andrew Lunn <andrew@lunn.ch> - 2017-09-28 19:00 +0200
      RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time  as a PTP hardware clock Brandon Streiff <brandon.streiff@ni.com> - 2017-09-29 17:50 +0200
    Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time  as a PTP hardware clock Andrew Lunn <andrew@lunn.ch> - 2017-09-28 19:10 +0200
      RE: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time  as a PTP hardware clock Brandon Streiff <brandon.streiff@ni.com> - 2017-09-29 17:20 +0200
  Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Andrew Lunn <andrew@lunn.ch> - 2017-09-28 19:40 +0200
    Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Florian Fainelli <f.fainelli@gmail.com> - 2017-09-28 20:00 +0200
    RE: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Brandon Streiff <brandon.streiff@ni.com> - 2017-09-29 17:40 +0200
  Re: [PATCH net-next RFC 0/9] net: dsa: PTP timestamping for mv88e6xxx Richard Cochran <richardcochran@gmail.com> - 2017-09-29 11:50 +0200

csiph-web