1
0
Fork 0
alistair23-linux/drivers
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
..
accessibility
acpi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-10-07 21:26:52 -04:00
amba
ata ARM: SoC non-critical bug fixes for 3.18 2014-10-08 17:03:09 -04:00
atm
auxdisplay
base Driver core patches for 3.18-rc1 2014-10-08 06:53:19 -04:00
bcma bcma: use chipcommon node from DT for SoC GPIO chip 2014-09-30 13:17:14 -04:00
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
bluetooth Bluetooth: btusb: remove redundant lock variable 2014-09-30 14:13:29 +02:00
bus ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
cdrom
char Char/Misc driver patches for 3.18-rc1 2014-10-08 06:55:41 -04:00
clk ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
clocksource ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
connector
cpufreq ARM: SoC non-critical bug fixes for 3.18 2014-10-08 17:03:09 -04:00
cpuidle ARM: SoC platform changes for 3.18 2014-10-08 17:13:04 -04:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-10-08 06:44:48 -04:00
dca
devfreq
dio
dma dmaengine-3.17 2014-10-07 20:39:25 -04:00
dma-buf
edac ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
eisa
extcon extcon: gpio: Fix code cleanup 2014-09-22 16:48:47 +09:00
firewire
firmware Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" 2014-09-23 22:01:55 +01:00
fmc
gpio ACPI and power management fixes for 3.17-rc7 2014-09-25 15:25:52 -07:00
gpu Staging patches for 3.18-rc1 2014-10-08 06:50:18 -04:00
hid Merge branches 'for-3.18/always-poll-quirk', 'for-3.18/logitech', 'for-3.18/picolcd', 'for-3.18/rmi', 'for-3.18/sony', 'for-3.18/uhid', 'for-3.18/upstream' and 'for-3.18/wacom' into for-linus 2014-10-06 23:34:40 +02:00
hsi
hv Drivers: hv: vmbus: Enable interrupt driven flow control 2014-09-23 23:31:22 -07:00
hwmon hwmon: (tmp103) Fix resource leak bug in tmp103 temperature sensor driver 2014-09-22 11:11:48 -07:00
hwspinlock
i2c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
ide
idle
iio staging: iio: fix up merge error 2014-09-22 07:54:10 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
input Merge branch 'next' into for-linus 2014-10-03 11:24:46 -07:00
iommu Fixes and features for 3.18. 2014-10-08 05:27:39 -04:00
ipack ipoctal: clear break interrupt as soon as it occurs 2014-09-23 23:26:42 -07:00
irqchip ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
isdn isdn/gigaset: fix usb_gigaset write_cmd result race 2014-10-14 15:05:35 -04:00
leds ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
lguest
macintosh
mailbox mailbox/omap: add support for parsing dt devices 2014-09-11 11:39:14 -07:00
mcb
md md/raid5: disable 'DISCARD' by default due to safety concerns. 2014-10-02 13:45:00 +10:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
memory
memstick
message SCSI for-linus on 20141007 2014-10-07 21:29:18 -04:00
mfd Immutable branch between MFD and some ARM sub-arch maintainers. 2014-09-16 10:24:16 +08:00
misc ARM: SoC cleanups for 3.18 2014-10-08 17:06:53 -04:00
mmc
mtd Two trivial MTD updates for 3.17-rc4: 2014-09-06 12:12:09 -07:00
net net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-10-07 14:48:29 -04:00
ntb ntb: Add alignment check to meet hardware requirement 2014-09-14 00:10:38 -04:00
nubus
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
oprofile
parisc parisc: Fix serial console for machines with serial port on superio chip 2014-10-01 22:12:50 +02:00
parport parport: parport_pc: Implement architecture and device check to cut off false-positives 2014-09-23 23:14:28 -07:00
pci PCI updates for v3.17: 2014-09-24 09:46:29 -07:00
pcmcia
phy phy: remove .owner field for drivers using module_platform_driver 2014-09-24 15:18:34 +05:30
pinctrl This is the bulk of pin control changes for the v3.18 2014-10-07 20:56:28 -04:00
platform Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
pnp
power power: reset: driver for the Versatile syscon reboot 2014-09-26 00:25:59 +02:00
powercap powercap / RAPL: change domain detection message 2014-09-03 01:29:00 +02:00
pps
ps3
ptp
pwm Second batch of AT91 cleanup for 3.18: 2014-09-09 17:03:17 +02:00
rapidio
ras
regulator Merge remote-tracking branches 'regulator/topic/tps65217', 'regulator/topic/tps65910' and 'regulator/topic/voltage-ev' into regulator-next 2014-09-30 13:50:31 +01:00
remoteproc
reset
rpmsg
rtc ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
s390 net: better IFF_XMIT_DST_RELEASE support 2014-10-07 13:22:11 -04:00
sbus
scsi cxgb4i : Fix -Wmaybe-uninitialized warning. 2014-10-15 12:13:27 -04:00
sfi
sh
sn
soc ARM: SoC driver updates for 3.18 2014-10-08 17:37:16 -04:00
spi Merge remote-tracking branch 'spi/topic/xilinx' into spi-next 2014-10-03 16:33:44 +01:00
spmi
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
target iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure 2014-09-17 13:44:01 -07:00
tc
thermal thermal: Remove ARCH_KIRKWOOD dependency 2014-09-09 14:39:21 +00:00
thunderbolt
tty TTY/Serial driver patches for 3.18-rc1 2014-10-08 06:52:11 -04:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-10-08 21:40:54 -04:00
uwb uwb: add an ASIE sysfs attribute to uwb_rc devices 2014-09-23 22:05:26 -07:00
vfio
vhost
video Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
virt
virtio virtio_ring: unify direct/indirect code paths. 2014-09-13 12:52:35 -04:00
vlynq
vme
w1
watchdog watchdog: Remove ARCH_KIRKWOOD dependency 2014-09-09 14:40:17 +00:00
xen xen: bug fixes for 3.17-rc4 2014-09-11 16:52:29 -07:00
zorro
Kconfig soc: ti: add Keystone Navigator QMSS driver 2014-09-24 09:49:14 -04:00
Makefile