linux/drivers/net/ethernet/freescale
Nimrod Andy 28b5f058cf net: fec: ptp: fix convergence issue to support LinuxPTP stack
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>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-15 16:40:11 -04:00
..
fs_enet net: fs_enet: error: 'SCCE_ENET_TXF' undeclared 2014-10-10 00:51:24 -04:00
fec_main.c net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fec_mpc52xx_phy.c net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata() 2013-08-21 12:27:04 -07:00
fec_mpc52xx.c fec_mpc52xx: delete unneeded test before of_node_put 2014-08-08 10:28:08 -07:00
fec_mpc52xx.h
fec_ptp.c net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fec.h net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fsl_pq_mdio.c net/fsl_pq_mdio: Replace spin_event_timeout() with arch independent 2014-10-09 01:40:37 -04:00
gianfar_ethtool.c gianfar: Check if phydev present on ethtool -A 2014-04-24 13:36:16 -04:00
gianfar_ptp.c ptp: drivers: set the number of programmable pins. 2014-03-21 14:21:14 -04:00
gianfar.c gianfar: Replace eieio with wmb for non-PPC archs 2014-10-09 01:40:37 -04:00
gianfar.h gianfar: Replace eieio with wmb for non-PPC archs 2014-10-09 01:40:37 -04:00
Kconfig net/fsl: xgmac_mdio is dependent on OF_MDIO 2014-06-11 15:50:59 -07:00
Makefile gianfar: Remove sysfs stubs for FIFOCFG and stashing 2014-02-18 15:03:02 -05:00
ucc_geth_ethtool.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ucc_geth.c net: ucc_geth: fix build failure 2014-08-10 21:40:15 -07:00
ucc_geth.h net: remove skb recycling 2012-10-07 00:40:54 -04:00
xgmac_mdio.c net/fsl: Add format length modifier to avoid negative values 2014-07-30 19:58:09 -07:00