summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
diff options
context:
space:
mode:
authorSergey Temerkhanov <sergey.temerkhanov@intel.com>2024-08-21 16:09:56 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2024-10-01 21:11:38 +0300
commite800654e85b5b27966fc6493201f5f8cf658beb6 (patch)
tree775cfd551dfd6f21203905cdd0cf3819e7686e5e /drivers/net/ethernet/intel/ice/ice_ptp_hw.h
parentfdb7f54700b1c88e734323a62fea986d9ce5a9c6 (diff)
downloadlinux-e800654e85b5b27966fc6493201f5f8cf658beb6.tar.xz
ice: Use ice_adapter for PTP shared data instead of auxdev
Use struct ice_adapter to hold shared PTP data and control PTP related actions instead of auxbus. This allows significant code simplification and faster access to the container fields used in the PTP support code. Move the PTP port list to the ice_adapter container to simplify the code and avoid race conditions which could occur due to the synchronous nature of the initialization/access and certain memory saving can be achieved by moving PTP data into the ice_adapter itself. Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ptp_hw.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_ptp_hw.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
index fc946fcd28b9..1a61d4826271 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
+++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.h
@@ -468,6 +468,11 @@ static inline u64 ice_get_base_incval(struct ice_hw *hw)
}
}
+static inline bool ice_is_dual(struct ice_hw *hw)
+{
+ return !!(hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M);
+}
+
#define PFTSYN_SEM_BYTES 4
#define ICE_PTP_CLOCK_INDEX_0 0x00