From: Matt Carlson Date: Mon, 3 Dec 2012 19:36:58 +0000 (+0000) Subject: tg3: PTP - Implement the ptp api and ethtool functions X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~103 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d41e49ac2a10a269bb50b4b019d75eed16fd55d;p=pandora-kernel.git tg3: PTP - Implement the ptp api and ethtool functions This patch adds the ptp_caps structure, ptp api implementation, reference clock read and register/unregister functions. All the basic clock operations as described in Documentation/ptp/ptp.txt are supported. Frequency adjustment is performed using hardware with a 24 bit accumulator and a programmable correction value. On each clk, the correction value gets added to the accumulator and when it overflows, the time counter is incremented/decremented and the accumulator reset. So conversion from ppb to correction value is ppb * (1 << 24) / 1000000000 [Re-organized to put the ptp_clock_info struct declaration in one patch, added ptp_clock_info.name, and added locking to tg3_ptp_adjtime() based on input from Richard Cochran.] Signed-off-by: Nithin Nayak Sujir Signed-off-by: Michael Chan Cc: Richard Cochran Signed-off-by: David S. Miller --- Reading git-diff-tree failed