Home
last modified time | relevance | path

Searched hist:d82303df06481235fe7cbaf605075e0c2c87e99b (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_ptp.cdiff d82303df06481235fe7cbaf605075e0c2c87e99b Mon Nov 14 15:37:01 CST 2022 Jacob Keller <jacob.e.keller@intel.com> mlxsw: update adjfine to use adjust_by_scaled_ppm

The mlxsw adjfine implementation in the spectrum_ptp.c file converts
scaled_ppm into ppb before updating a cyclecounter multiplier using the
standard "base * ppb / 1billion" calculation.

This can be re-written to use adjust_by_scaled_ppm, directly using the
scaled parts per million and reducing the amount of code required to
express this calculation.

We still calculate the parts per billion for passing into
mlxsw_sp_ptp_phc_adjfreq because this function requires the input to be in
parts per billion.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Amit Cohen <amcohen@nvidia.com>
Cc: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20221114213701.815132-1-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>