ptp: bnxt: convert .adjfreq to .adjfine
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 9 Nov 2022 23:09:43 +0000 (15:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Nov 2022 10:58:39 +0000 (10:58 +0000)
commita29c132f92ed5af6e7116966b7e9899d4c22783c
treee172417a021d91b388a8e1a459ae2cb6b3a389d7
parenta45392071ceeebe85622705a1d7500ed434785a7
ptp: bnxt: convert .adjfreq to .adjfine

When the BNXT_FW_CAP_PTP_RTC flag is not set, the bnxt driver implements
.adjfreq on a cyclecounter in terms of the straightforward "base * ppb / 1
billion" calculation. When BNXT_FW_CAP_PTP_RTC is set, the driver forwards
the ppb value to firmware for configuration.

Convert the driver to the newer .adjfine interface, updating the
cyclecounter calculation to use adjust_by_scaled_ppm to perform the
calculation. Use scaled_ppm_to_ppb when forwarding the correction to
firmware.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c