diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2024-05-28 16:03:52 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-01 15:51:50 -0700 |
commit | 579a2302bd16277918f862a1dd9f3f904264fa1a (patch) | |
tree | fcce6f038610ea6f750d39f1bbb2944911cbc90a /drivers/net/ethernet/intel/ice/ice_ptp.c | |
parent | d551d075b043821880b8afc0010ef70d050716d0 (diff) | |
download | linux-579a2302bd16277918f862a1dd9f3f904264fa1a.tar.gz linux-579a2302bd16277918f862a1dd9f3f904264fa1a.tar.bz2 linux-579a2302bd16277918f862a1dd9f3f904264fa1a.zip |
ice: Introduce helper to get tmr_cmd_reg values
Multiple places in the driver code need to convert enum ice_ptp_tmr_cmd
values into register bits for both the main timer and the PHY port
timers. The main MAC register has one bit scheme for timer commands,
while the PHY commands use a different scheme.
The E810 and E830 devices use the same scheme for port commands as used
for the main timer. However, E822 and ETH56G hardware has a separate
scheme used by the PHY.
Introduce helper functions to convert the timer command enumeration into
the register values, reducing some code duplication, and making it
easier to later refactor the individual port write commands.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240528-next-2024-05-28-ptp-refactors-v1-2-c082739bb6f6@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ptp.c')
0 files changed, 0 insertions, 0 deletions