]> asedeno.scripts.mit.edu Git - linux.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)
commit428951161b8ab73d547c8915dcfc5fa6f10012a8
tree9b1f1782abeb9e2a51437a4529198e8a529bafb0
parentb9972d2205f696fdb53ee0133aebd2d0a99e1801
ptp: gianfar: Use high resolution frequency method.

This patch depends on commit d8d263541913 ("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