netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Richard Cochran <richardcochran@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Antoine Tenart <antoine.tenart@bootlin.com>,
	Matteo Croce <mcroce@redhat.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Sven Auhagen <sven.auhagen@voleatech.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 4/6] net: mvpp2: ptp: add TAI support
Date: Tue, 8 Sep 2020 08:41:58 +0100	[thread overview]
Message-ID: <20200908074158.GD1605@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200906200402.GX1551@shell.armlinux.org.uk>

On Sun, Sep 06, 2020 at 09:04:02PM +0100, Russell King - ARM Linux admin wrote:
> > > +static void mvpp22_tai_set_tod(struct mvpp2_tai *tai)
> > > +{
> > > +	struct timespec64 now;
> > > +
> > > +	ktime_get_real_ts64(&now);
> > > +	mvpp22_tai_settime64(&tai->caps, &now);
> > > +}
> > > +
> > > +static void mvpp22_tai_init(struct mvpp2_tai *tai)
> > > +{
> > > +	void __iomem *base = tai->base;
> > > +
> > > +	mvpp22_tai_set_step(tai);
> > > +
> > > +	/* Release the TAI reset */
> > > +	mvpp2_tai_modify(base + MVPP22_TAI_CR0, CR0_SW_NRESET, CR0_SW_NRESET);
> > > +
> > > +	mvpp22_tai_set_tod(tai);
> > 
> > The consensus on the list seems to be that new PHCs should start
> > ticking from time zero (1970), although some older drivers do use
> > ktime.  For new clocks, I'd prefer using zero.
> 
> Ok.

Should we always set the TAI counter to zero every time the TAI is
initialised, or just leave it as is (the counter may already be set
by a previous kernel, for example when a kexec has happened).

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2020-09-08  7:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04  7:28 [PATCH net-next v2 0/6] Marvell PP2.2 PTP support Russell King - ARM Linux admin
2020-09-04  7:29 ` [PATCH net-next v2 1/6] net: mvpp2: restructure "link status" interrupt handling Russell King
2020-09-04  7:29 ` [PATCH net-next v2 2/6] net: mvpp2: rename mis-named "link status" interrupt Russell King
2020-09-04  7:29 ` [PATCH net-next v2 3/6] net: mvpp2: check first level interrupt status registers Russell King
2020-09-04  7:29 ` [PATCH net-next v2 4/6] net: mvpp2: ptp: add TAI support Russell King
2020-09-05 17:02   ` Richard Cochran
2020-09-06 20:04     ` Russell King - ARM Linux admin
2020-09-08  7:41       ` Russell King - ARM Linux admin [this message]
2020-09-08 14:25         ` Richard Cochran
2020-09-04  7:29 ` [PATCH net-next v2 5/6] net: mvpp2: ptp: add support for receive timestamping Russell King
2020-09-04  7:29 ` [PATCH net-next v2 6/6] net: mvpp2: ptp: add support for transmit timestamping Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200908074158.GD1605@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andre.przywara@arm.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=sven.auhagen@voleatech.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).