]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_ptp: Use 'struct mlxsw_sp_ptp_clock' per ASIC
authorAmit Cohen <amcohen@nvidia.com>
Sun, 24 Jul 2022 08:03:27 +0000 (11:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2022 12:58:55 +0000 (13:58 +0100)
commita711a592fa2027a37373c5bd174fc9f469b8f726
treed69b56d69ff51abdedc299afbd12651fbd454974
parentcd4b44614c755b38fa7c3fd7771ddc9371b01725
mlxsw: spectrum_ptp: Use 'struct mlxsw_sp_ptp_clock' per ASIC

Currently, there is one shared structure that holds the required
structures for PTP clock. Most of the existing fields are relevant only
for Spectrum-1 (cycles, timecounter, and more). Rename the structure to
be specific for Spectrum-1 and align the existing code. Add a common
structure which includes the structures which will be used also for
Spectrum-2. This structure will be returned from clock_init() operation,
as the definition is shared between all ASICs' operations.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c