From: Harini Katakam <harinikatakamlinux@gmail.com> To: Richard Cochran <richardcochran@gmail.com> Cc: Andrei Pistirica <andrei.pistirica@microchip.com>, netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, davem@davemloft.net, Nicolas Ferre <nicolas.ferre@atmel.com>, Harini Katakam <harini.katakam@xilinx.com>, Punnaiah Choudary Kalluri <punnaia@xilinx.com>, "michals@xilinx.com" <michals@xilinx.com>, Anirudha Sarangi <anirudh@xilinx.com>, Boris Brezillon <boris.brezillon@free-electrons.com>, alexandre.belloni@free-electrons.com, tbultel@pixelsurmer.com Subject: Re: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Date: Thu, 8 Sep 2016 10:22:43 +0530 [thread overview] Message-ID: <CAFcVECJxJgJUeO4=yudwTj5NkxDob5tCZaom9YTqWWmtt7ajFw@mail.gmail.com> (raw) In-Reply-To: <20160906154809.GA7012@localhost.localdomain> Hi, On Tue, Sep 6, 2016 at 9:18 PM, Richard Cochran <richardcochran@gmail.com> wrote: > <snip> >> +#define GEM_TISUBN 0x01bc /* 1588 Timer Increment Sub-ns */ > > This regsiter does not exist. Looking at > > Zynq-7000 AP SoC Technical Reference Manual > UG585 (v1.10) February 23, 2015 > > starting on page 1273 we see: > > udp_csum_errors 0x000001B0 32 ro 0x00000000 UDP checksum error > timer_strobe_s 0x000001C8 32 rw 0x00000000 1588 timer sync strobe seconds > timer_strobe_ns 0x000001CC 32 mixed 0x00000000 1588 timer sync strobe nanoseconds > timer_s 0x000001D0 32 rw 0x00000000 1588 timer seconds > timer_ns 0x000001D4 32 mixed 0x00000000 1588 timer nanoseconds > timer_adjust 0x000001D8 32 mixed 0x00000000 1588 timer adjust > timer_incr 0x000001DC 32 mixed 0x00000000 1588 timer increment > > There is no register at 0x1BC. > >> +#define GEM_TSH 0x01c0 /* 1588 Timer Seconds High */ > > This one doesn't exist either. What is going on here? I cant be sure of the version of Cadence GEM used in SAMA5D2 but these registers (sub ns increments alteast) only exist in the IP version used in Zynq Ultrascale+ MPSoC. <snip> >> + /* 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. Although when writing, the write to MSB and LSB registers was made atomic. This bug fix came only in the most recent version of the IP, am afraid. Regards, Harini
WARNING: multiple messages have this Message-ID (diff)
From: harinikatakamlinux@gmail.com (Harini Katakam) To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM. Date: Thu, 8 Sep 2016 10:22:43 +0530 [thread overview] Message-ID: <CAFcVECJxJgJUeO4=yudwTj5NkxDob5tCZaom9YTqWWmtt7ajFw@mail.gmail.com> (raw) In-Reply-To: <20160906154809.GA7012@localhost.localdomain> Hi, On Tue, Sep 6, 2016 at 9:18 PM, Richard Cochran <richardcochran@gmail.com> wrote: > <snip> >> +#define GEM_TISUBN 0x01bc /* 1588 Timer Increment Sub-ns */ > > This regsiter does not exist. Looking at > > Zynq-7000 AP SoC Technical Reference Manual > UG585 (v1.10) February 23, 2015 > > starting on page 1273 we see: > > udp_csum_errors 0x000001B0 32 ro 0x00000000 UDP checksum error > timer_strobe_s 0x000001C8 32 rw 0x00000000 1588 timer sync strobe seconds > timer_strobe_ns 0x000001CC 32 mixed 0x00000000 1588 timer sync strobe nanoseconds > timer_s 0x000001D0 32 rw 0x00000000 1588 timer seconds > timer_ns 0x000001D4 32 mixed 0x00000000 1588 timer nanoseconds > timer_adjust 0x000001D8 32 mixed 0x00000000 1588 timer adjust > timer_incr 0x000001DC 32 mixed 0x00000000 1588 timer increment > > There is no register at 0x1BC. > >> +#define GEM_TSH 0x01c0 /* 1588 Timer Seconds High */ > > This one doesn't exist either. What is going on here? I cant be sure of the version of Cadence GEM used in SAMA5D2 but these registers (sub ns increments alteast) only exist in the IP version used in Zynq Ultrascale+ MPSoC. <snip> >> + /* 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. Although when writing, the write to MSB and LSB registers was made atomic. This bug fix came only in the most recent version of the IP, am afraid. Regards, Harini
next prev parent reply other threads:[~2016-09-08 4:52 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-02 12:53 [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM Andrei Pistirica 2016-09-02 12:53 ` Andrei Pistirica 2016-09-02 12:53 ` [RFC PATCH 2/2] macb: Enable 1588 support in SAMA5D2 platform Andrei Pistirica 2016-09-02 12:53 ` Andrei Pistirica 2016-09-06 7:43 ` Harini Katakam 2016-09-06 7:43 ` Harini Katakam 2016-09-06 7:43 ` Harini Katakam 2016-09-06 16:37 ` Richard Cochran 2016-09-06 16:37 ` Richard Cochran 2016-09-06 16:37 ` Richard Cochran 2016-09-09 14:08 ` Andrei Pistirica 2016-09-09 14:08 ` Andrei Pistirica 2016-09-06 7:36 ` [RFC PATCH 1/2] macb: Add 1588 support in Cadence GEM Harini Katakam 2016-09-06 7:36 ` Harini Katakam 2016-09-06 7:36 ` Harini Katakam 2016-09-06 15:48 ` Richard Cochran 2016-09-06 15:48 ` Richard Cochran 2016-09-06 15:48 ` Richard Cochran 2016-09-08 4:52 ` Harini Katakam [this message] 2016-09-08 4:52 ` Harini Katakam 2016-09-08 4:52 ` Harini Katakam 2016-09-08 7:44 ` Richard Cochran 2016-09-08 7:44 ` Richard Cochran 2016-09-08 7:44 ` Richard Cochran 2016-09-08 19:06 ` Richard Cochran 2016-09-08 19:06 ` Richard Cochran 2016-09-08 19:06 ` Richard Cochran 2016-09-09 13:51 ` Andrei Pistirica 2016-09-09 13:51 ` Andrei Pistirica 2016-11-18 12:05 Rafal Ozieblo
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='CAFcVECJxJgJUeO4=yudwTj5NkxDob5tCZaom9YTqWWmtt7ajFw@mail.gmail.com' \ --to=harinikatakamlinux@gmail.com \ --cc=alexandre.belloni@free-electrons.com \ --cc=andrei.pistirica@microchip.com \ --cc=anirudh@xilinx.com \ --cc=boris.brezillon@free-electrons.com \ --cc=davem@davemloft.net \ --cc=harini.katakam@xilinx.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michals@xilinx.com \ --cc=netdev@vger.kernel.org \ --cc=nicolas.ferre@atmel.com \ --cc=punnaia@xilinx.com \ --cc=richardcochran@gmail.com \ --cc=tbultel@pixelsurmer.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.