]> 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)
commit447692e45c25a2d2c438c4197e0f07b0ef69fa5e
tree9b1f1782abeb9e2a51437a4529198e8a529bafb0
parent5eaf066866915e41e390bdafbc34455e9a90bddb
ptp: gianfar: Use high resolution frequency method.

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