From: David Miller <davem@davemloft.net>
To: b38611@freescale.com
Cc: richardcochran@gmail.com, netdev@vger.kernel.org,
bhutchings@solarflare.com, b20596@freescale.com
Subject: Re: [PATCH v2 1/1] net: fec: ptp: fix convergence issue to support LinuxPTP stack
Date: Wed, 15 Oct 2014 16:40:39 -0400 (EDT) [thread overview]
Message-ID: <20141015.164039.817474261624839292.davem@davemloft.net> (raw)
In-Reply-To: <1413365412-22072-1-git-send-email-b38611@freescale.com>
From: Fugang Duan <b38611@freescale.com>
Date: Wed, 15 Oct 2014 17:30:12 +0800
> iMX6SX IEEE 1588 module has one hw issue in capturing the ATVR register.
> The current SW flow is:
> ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
> ts_counter_ns = ENET0->ATVR;
> The ATVR value is not expected value that cause LinuxPTP stack cannot be convergent.
>
> ENET Block Guide/ Chapter for the iMX6SX (PELE) address the issue:
> After set ENET_ATCR[Capture], there need some time cycles before the counter
> value is capture in the register clock domain. The wait-time-cycles is at least
> 6 clock cycles of the slower clock between the register clock and the 1588 clock.
> So need something like:
> ENET0->ATCR |= ENET_ATCR_CAPTURE_MASK;
> wait();
> ts_counter_ns = ENET0->ATVR;
>
> For iMX6SX, the 1588 ts_clk is fixed to 25Mhz, register clock is 66Mhz, so the
> wait-time-cycles must be greater than 240ns (40ns * 6). The patch add 1us delay
> before cpu read ATVR register.
>
> Changes V2:
> Modify the commit/comments log to describe the issue clearly.
>
> Signed-off-by: Fugang Duan <B38611@freescale.com>
Applied, thanks.
prev parent reply other threads:[~2014-10-15 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 9:30 [PATCH v2 1/1] net: fec: ptp: fix convergence issue to support LinuxPTP stack Fugang Duan
2014-10-15 13:25 ` Richard Cochran
2014-10-15 20:40 ` David Miller [this message]
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=20141015.164039.817474261624839292.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=b20596@freescale.com \
--cc=b38611@freescale.com \
--cc=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.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: 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).