mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-02 20:29:20 +00:00
net/mlx5: PTP code migration to driver core section
PTP code is moved to core section of mlx5 driver in order to share it between ethernet and infiniband. This movement involves the following changes: - Change mlx5e_ prefix to be mlx5_ - Add clock structs to Core - Add clock object to mlx5_core_dev - Call Init/Uninit clock from core init/cleanup - Rename mlx5e_tstamp to be mlx5_clock Signed-off-by: Feras Daoud <ferasda@mellanox.com> Signed-off-by: Eitan Rabin <rabin@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
ae904beaea
commit
7c39afb394
12 changed files with 412 additions and 378 deletions
|
@ -49,6 +49,8 @@
|
|||
#include <linux/mlx5/device.h>
|
||||
#include <linux/mlx5/doorbell.h>
|
||||
#include <linux/mlx5/srq.h>
|
||||
#include <linux/timecounter.h>
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
|
||||
enum {
|
||||
MLX5_BOARD_ID_LEN = 64,
|
||||
|
@ -760,6 +762,27 @@ struct mlx5_rsvd_gids {
|
|||
struct ida ida;
|
||||
};
|
||||
|
||||
#define MAX_PIN_NUM 8
|
||||
struct mlx5_pps {
|
||||
u8 pin_caps[MAX_PIN_NUM];
|
||||
struct work_struct out_work;
|
||||
u64 start[MAX_PIN_NUM];
|
||||
u8 enabled;
|
||||
};
|
||||
|
||||
struct mlx5_clock {
|
||||
rwlock_t lock;
|
||||
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 ptp_clock *ptp;
|
||||
struct ptp_clock_info ptp_info;
|
||||
struct mlx5_pps pps_info;
|
||||
};
|
||||
|
||||
struct mlx5_core_dev {
|
||||
struct pci_dev *pdev;
|
||||
/* sync pci state */
|
||||
|
@ -800,6 +823,7 @@ struct mlx5_core_dev {
|
|||
#ifdef CONFIG_RFS_ACCEL
|
||||
struct cpu_rmap *rmap;
|
||||
#endif
|
||||
struct mlx5_clock clock;
|
||||
};
|
||||
|
||||
struct mlx5_db {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue