> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Karol > Kolacinski > Sent: Wednesday, April 24, 2024 7:00 PM > To: [email protected] > Cc: [email protected]; Kubalewski, Arkadiusz > <[email protected]>; Kolacinski, Karol > <[email protected]>; Nguyen, Anthony L <[email protected]>; > Kitszel, Przemyslaw <[email protected]>; Keller, Jacob E > <[email protected]> > Subject: [Intel-wired-lan] [PATCH v10 iwl-next 02/12] ice: Introduce helper > to get tmr_cmd_reg values > > From: Jacob Keller <[email protected]> > > 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. > > Signed-off-by: Jacob Keller <[email protected]> > Reviewed-by: Przemek Kitszel <[email protected]> > Reviewed-by: Arkadiusz Kubalewski <[email protected]> > Signed-off-by: Karol Kolacinski <[email protected]> > --- > V4 -> V5: Changed operation sequence to shift tmr_idx instead of cmd_val > > drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 140 ++++++++++++-------- > drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 2 +- > 2 files changed, 89 insertions(+), 53 deletions(-) >
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
