]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: gianfar: Use high resolution frequency method.
authorUlrik De Bie <ulrik.debie-os@e2big.org>
Wed, 23 Nov 2016 20:11:04 +0000 (21:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Nov 2016 20:26:15 +0000 (15:26 -0500)
commit53b37f26bf62ac6d66645ed1f527835937f7c446
tree9b1f1782abeb9e2a51437a4529198e8a529bafb0
parentbc277908067dcbc71a798b850c5155deb52d3d3a
ptp: gianfar: Use high resolution frequency method.

This patch depends on commit 4fee85332a2e ("ptp: Introduce a high
resolution frequency adjustment method.")

The gianfar devices offer a frequency resolution of about 0.46 ppb
(depends on actual value of tmr_add, for the calculation assumed
0x80000000). This patch lets users of the device benefit from the increased
frequency resolution when tuning the clock. Thanks to the rounding the
maximum error between the requested frequency and the applied frequency
will then be about 0.23 ppb.

Tested on a v3.3.8 kernel on a real gianfar device. Verified compilation
on net-next (currently at v4.9-rc5).

Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar_ptp.c