From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752181AbdI1Q4t (ORCPT ); Thu, 28 Sep 2017 12:56:49 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60128 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751999AbdI1Q4r (ORCPT ); Thu, 28 Sep 2017 12:56:47 -0400 Date: Thu, 28 Sep 2017 18:56:43 +0200 From: Andrew Lunn To: Brandon Streiff Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , Florian Fainelli , Vivien Didelot , Richard Cochran , Erik Hons Subject: Re: [PATCH net-next RFC 2/9] net: dsa: mv88e6xxx: expose switch time as a PTP hardware clock Message-ID: <20170928165643.GB14940@lunn.ch> References: <1506612341-18061-1-git-send-email-brandon.streiff@ni.com> <1506612341-18061-3-git-send-email-brandon.streiff@ni.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506612341-18061-3-git-send-email-brandon.streiff@ni.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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