OSDN Git Service

ice: introduce ice_ptp_init_phc function
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 13 Oct 2021 15:52:29 +0000 (08:52 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 21 Dec 2021 17:11:02 +0000 (09:11 -0800)
commitb2ee72565cd0ee24d2067e3de9094a14644493a8
tree407ceaee968cd828f6eea27fa3d2c7260114ae3b
parent39b2810642e85f8191cc5494bc4019888ec57cbf
ice: introduce ice_ptp_init_phc function

When we enable support for E822 devices, there are some additional
steps required to initialize the PTP hardware clock. To make this easier
to implement as device-specific behavior, refactor the register setups
in ice_ptp_init_owner to a new ice_ptp_init_phc function defined in
ice_ptp_hw.c

This function will have a common section, and an e810 specific
sub-implementation.

This will enable easily extending the functionality to cover the E822
specific setup required to initialize the hardware clock generation
unit. It also makes it clear which steps are E810 specific vs which ones
are necessary for all ice devices.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp.c
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
drivers/net/ethernet/intel/ice/ice_ptp_hw.h