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 via email to