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


Groups > linux.kernel > #1479453

Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM.

From Richard Cochran <richardcochran@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM.
Date 2016-09-08 21:10 +0200
Message-ID <sfcRY-1jO-3@gated-at.bofh.it> (permalink)
References <scWeB-82j-21@gated-at.bofh.it> <seqNj-3PR-25@gated-at.bofh.it> <seZBn-1bP-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 08, 2016 at 10:22:43AM +0530, Harini Katakam wrote:
> >> +     /* get GEM internal time */
> >> +     sech = gem_readl(bp, TSH);
> >> +     secl = gem_readl(bp, TSL);
> >
> > Does reading TSH latch the time?  The TRM is silent about that, and
> > most other designs latch on reading the LSB.
> 
> No, it does not latch the time.
> When doing a read + adjust + write, this will
> mean there's room for some error.

It also means that you will have to handle when the TSL value
overflows into TSH.  That means reading TSH twice, once before and
once after reading TSL and retrying if needed.

The code as written above will produce apparent jumps backwards in
time, whenever the overflow occurs between the two read operations.

Thanks,
Richard

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


Thread

[RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Andrei Pistirica <andrei.pistirica@microchip.com> - 2016-09-02 15:00 +0200
  [RFC PATCH 2/2] macb: Enable 1588 support in SAMA5D2 platform. Andrei Pistirica <andrei.pistirica@microchip.com> - 2016-09-02 15:00 +0200
    Re: [RFC PATCH 2/2] macb: Enable 1588 support in SAMA5D2 platform. Harini Katakam <harinikatakamlinux@gmail.com> - 2016-09-06 09:50 +0200
    Re: [RFC PATCH 2/2] macb: Enable 1588 support in SAMA5D2 platform. Richard Cochran <richardcochran@gmail.com> - 2016-09-06 18:50 +0200
  Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Harini Katakam <harinikatakamlinux@gmail.com> - 2016-09-06 09:40 +0200
  Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Richard Cochran <richardcochran@gmail.com> - 2016-09-06 17:50 +0200
    Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Harini Katakam <harinikatakamlinux@gmail.com> - 2016-09-08 07:00 +0200
      Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Richard Cochran <richardcochran@gmail.com> - 2016-09-08 09:50 +0200
      Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Richard Cochran <richardcochran@gmail.com> - 2016-09-08 21:10 +0200

csiph-web