diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2021-02-13 01:30:40 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-02-17 01:04:54 +0300 |
commit | d6f3dc8f509ce6288e2537eb4b0614ef444fd84a (patch) | |
tree | cb72aec648de5716240879af45f05bdcb7f3d85c /include | |
parent | 1436de0b991548fd859a00c889b8c4dcbbb5f463 (diff) | |
download | linux-d6f3dc8f509ce6288e2537eb4b0614ef444fd84a.tar.xz |
net/mlx5: Move all internal timer metadata into a dedicated struct
Internal timer mode (SW clock) requires some PTP clock related metadata
structs. Real time mode (HW clock) will not need these metadata structs.
This separation emphasize the different interfaces for HW clock and SW
clock.
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx5/driver.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 2eb7755143d7..2f4d6182df1b 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -662,18 +662,22 @@ struct mlx5_pps { u8 enabled; }; -struct mlx5_clock { - struct mlx5_nb pps_nb; - seqlock_t lock; +struct mlx5_timer { struct cyclecounter cycles; struct timecounter tc; - struct hwtstamp_config hwtstamp_config; u32 nominal_c_mult; unsigned long overflow_period; struct delayed_work overflow_work; +}; + +struct mlx5_clock { + struct mlx5_nb pps_nb; + seqlock_t lock; + struct hwtstamp_config hwtstamp_config; struct ptp_clock *ptp; struct ptp_clock_info ptp_info; struct mlx5_pps pps_info; + struct mlx5_timer timer; }; struct mlx5_dm; |