net/mlx5: Move some PPS logic into helper functions
authorEran Ben Elisha <eranbe@mellanox.com>
Fri, 12 Feb 2021 22:30:41 +0000 (14:30 -0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 16 Feb 2021 22:04:54 +0000 (14:04 -0800)
commitde19cd6cc9777e258de853c3ddf5d5a7bbadf165
treeea1e6548484a28259a6f28c153a3b33a490fa4ff
parentd6f3dc8f509ce6288e2537eb4b0614ef444fd84a
net/mlx5: Move some PPS logic into helper functions

Some of PPS logic (timestamp calculations) fits only internal timer
timestamp mode. Move these logics into helper functions. Later in the
patchset cyc2time HW translation mode will expose its own PPS timestamp
calculations.

With this change, main flow will only hold calling PPS logic based on run
time mode.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c