Skip to content

Commit 8e375f6

Browse files
committed
ice: E825C PHY register cleanup
jira LE-4694 Rebuild_History Non-Buildable kernel-6.12.0-55.43.1.el10_0 commit-author Karol Kolacinski <karol.kolacinski@intel.com> commit 50f4ffa Minor PTP register refactor, including logical grouping E825C 1-step timestamping registers. Remove unused register definitions (PHY_REG_GPCS_BITSLIP, PHY_REG_REVISION). Also, apply preferred GENMASK macro (instead of ICE_M) for register fields definition affected by this patch. Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com> Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250310174502.3708121-5-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> (cherry picked from commit 50f4ffa) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 4df9166 commit 8e375f6

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

drivers/net/ethernet/intel/ice/ice_ptp_hw.h

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -795,36 +795,19 @@ static inline bool ice_is_dual(struct ice_hw *hw)
795795
#define PHY_MAC_XIF_TS_SFD_ENA_M ICE_M(0x1, 20)
796796
#define PHY_MAC_XIF_GMII_TS_SEL_M ICE_M(0x1, 21)
797797

798-
/* GPCS config register */
799-
#define PHY_GPCS_CONFIG_REG0 0x268
800-
#define PHY_GPCS_CONFIG_REG0_TX_THR_M ICE_M(0xF, 24)
801-
#define PHY_GPCS_BITSLIP 0x5C
802-
803798
#define PHY_TS_INT_CONFIG_THRESHOLD_M ICE_M(0x3F, 0)
804799
#define PHY_TS_INT_CONFIG_ENA_M BIT(6)
805800

806-
/* 1-step PTP config */
807-
#define PHY_PTP_1STEP_CONFIG 0x270
808-
#define PHY_PTP_1STEP_T1S_UP64_M ICE_M(0xF, 4)
809-
#define PHY_PTP_1STEP_T1S_DELTA_M ICE_M(0xF, 8)
810-
#define PHY_PTP_1STEP_PEER_DELAY(_port) (0x274 + 4 * (_port))
811-
#define PHY_PTP_1STEP_PD_ADD_PD_M ICE_M(0x1, 0)
812-
#define PHY_PTP_1STEP_PD_DELAY_M ICE_M(0x3fffffff, 1)
813-
#define PHY_PTP_1STEP_PD_DLY_V_M ICE_M(0x1, 31)
814-
815801
/* Macros to derive offsets for TimeStampLow and TimeStampHigh */
816802
#define PHY_TSTAMP_L(x) (((x) * 8) + 0)
817803
#define PHY_TSTAMP_U(x) (((x) * 8) + 4)
818804

819-
#define PHY_REG_REVISION 0x85000
820-
821805
#define PHY_REG_DESKEW_0 0x94
822806
#define PHY_REG_DESKEW_0_RLEVEL GENMASK(6, 0)
823807
#define PHY_REG_DESKEW_0_RLEVEL_FRAC GENMASK(9, 7)
824808
#define PHY_REG_DESKEW_0_RLEVEL_FRAC_W 3
825809
#define PHY_REG_DESKEW_0_VALID GENMASK(10, 10)
826810

827-
#define PHY_REG_GPCS_BITSLIP 0x5C
828811
#define PHY_REG_SD_BIT_SLIP(_port_offset) (0x29C + 4 * (_port_offset))
829812
#define PHY_REVISION_ETH56G 0x10200
830813
#define PHY_VENDOR_TXLANE_THRESH 0x2000C
@@ -844,7 +827,21 @@ static inline bool ice_is_dual(struct ice_hw *hw)
844827
#define PHY_MAC_BLOCKTIME 0x50
845828
#define PHY_MAC_MARKERTIME 0x54
846829
#define PHY_MAC_TX_OFFSET 0x58
830+
#define PHY_GPCS_BITSLIP 0x5C
847831

848832
#define PHY_PTP_INT_STATUS 0x7FD140
849833

834+
/* ETH56G registers shared per quad */
835+
/* GPCS config register */
836+
#define PHY_GPCS_CONFIG_REG0 0x268
837+
#define PHY_GPCS_CONFIG_REG0_TX_THR_M GENMASK(27, 24)
838+
/* 1-step PTP config */
839+
#define PHY_PTP_1STEP_CONFIG 0x270
840+
#define PHY_PTP_1STEP_T1S_UP64_M GENMASK(7, 4)
841+
#define PHY_PTP_1STEP_T1S_DELTA_M GENMASK(11, 8)
842+
#define PHY_PTP_1STEP_PEER_DELAY(_quad_lane) (0x274 + 4 * (_quad_lane))
843+
#define PHY_PTP_1STEP_PD_ADD_PD_M BIT(0)
844+
#define PHY_PTP_1STEP_PD_DELAY_M GENMASK(30, 1)
845+
#define PHY_PTP_1STEP_PD_DLY_V_M BIT(31)
846+
850847
#endif /* _ICE_PTP_HW_H_ */

0 commit comments

Comments
 (0)