[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200908074158.GD1605@shell.armlinux.org.uk>
Date: Tue, 8 Sep 2020 08:41:58 +0100
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Richard Cochran <richardcochran@...il.com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Antoine Tenart <antoine.tenart@...tlin.com>,
Matteo Croce <mcroce@...hat.com>,
Andre Przywara <andre.przywara@....com>,
Sven Auhagen <sven.auhagen@...eatech.de>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 4/6] net: mvpp2: ptp: add TAI support
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!
Powered by blists - more mailing lists