net/ice/base: implement Vernier calibration for E822
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 10 Aug 2021 02:51:21 +0000 (10:51 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 11 Aug 2021 02:24:08 +0000 (04:24 +0200)
commitca3feb90361ed3b7a2972ac1f56b8d7a54273f91
treea131a4d2f81116f2957b80511815dec9a6f56c56
parent886b8115fc48b501d2463995d5d2c67c69adf84e
net/ice/base: implement Vernier calibration for E822

Move the implementation of Vernier calibration from Linux core ice_ptp.c
into the shared ice_ptp_hw.c file.

This implementation was recently refactored in Linux, so the move should
be verbatim with the latest Linux code that we had implemented.

This includes a new constant table with pre-determined values based on
link speed, new functions to aide in reading the multi-register values
from the PHY, functions to program the PAR/PCS conversion ratios, and
the UIX conversion ratios, functions to program the total Tx and Rx
offset after vernier calibration in the hardware completes, and finally
a function to start and stop the PHY timestamping block.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
drivers/net/ice/base/ice_ptp_consts.h
drivers/net/ice/base/ice_ptp_hw.c
drivers/net/ice/base/ice_ptp_hw.h