Skip to content

Commit 50f4ffa

Browse files
kolacinskikarolPaolo Abeni
authored andcommitted
ice: E825C PHY register cleanup
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>
1 parent 66a1b7e commit 50f4ffa

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
@@ -780,36 +780,19 @@ static inline bool ice_is_dual(struct ice_hw *hw)
780780
#define PHY_MAC_XIF_TS_SFD_ENA_M ICE_M(0x1, 20)
781781
#define PHY_MAC_XIF_GMII_TS_SEL_M ICE_M(0x1, 21)
782782

783-
/* GPCS config register */
784-
#define PHY_GPCS_CONFIG_REG0 0x268
785-
#define PHY_GPCS_CONFIG_REG0_TX_THR_M ICE_M(0xF, 24)
786-
#define PHY_GPCS_BITSLIP 0x5C
787-
788783
#define PHY_TS_INT_CONFIG_THRESHOLD_M ICE_M(0x3F, 0)
789784
#define PHY_TS_INT_CONFIG_ENA_M BIT(6)
790785

791-
/* 1-step PTP config */
792-
#define PHY_PTP_1STEP_CONFIG 0x270
793-
#define PHY_PTP_1STEP_T1S_UP64_M ICE_M(0xF, 4)
794-
#define PHY_PTP_1STEP_T1S_DELTA_M ICE_M(0xF, 8)
795-
#define PHY_PTP_1STEP_PEER_DELAY(_port) (0x274 + 4 * (_port))
796-
#define PHY_PTP_1STEP_PD_ADD_PD_M ICE_M(0x1, 0)
797-
#define PHY_PTP_1STEP_PD_DELAY_M ICE_M(0x3fffffff, 1)
798-
#define PHY_PTP_1STEP_PD_DLY_V_M ICE_M(0x1, 31)
799-
800786
/* Macros to derive offsets for TimeStampLow and TimeStampHigh */
801787
#define PHY_TSTAMP_L(x) (((x) * 8) + 0)
802788
#define PHY_TSTAMP_U(x) (((x) * 8) + 4)
803789

804-
#define PHY_REG_REVISION 0x85000
805-
806790
#define PHY_REG_DESKEW_0 0x94
807791
#define PHY_REG_DESKEW_0_RLEVEL GENMASK(6, 0)
808792
#define PHY_REG_DESKEW_0_RLEVEL_FRAC GENMASK(9, 7)
809793
#define PHY_REG_DESKEW_0_RLEVEL_FRAC_W 3
810794
#define PHY_REG_DESKEW_0_VALID GENMASK(10, 10)
811795

812-
#define PHY_REG_GPCS_BITSLIP 0x5C
813796
#define PHY_REG_SD_BIT_SLIP(_port_offset) (0x29C + 4 * (_port_offset))
814797
#define PHY_REVISION_ETH56G 0x10200
815798
#define PHY_VENDOR_TXLANE_THRESH 0x2000C
@@ -829,7 +812,21 @@ static inline bool ice_is_dual(struct ice_hw *hw)
829812
#define PHY_MAC_BLOCKTIME 0x50
830813
#define PHY_MAC_MARKERTIME 0x54
831814
#define PHY_MAC_TX_OFFSET 0x58
815+
#define PHY_GPCS_BITSLIP 0x5C
832816

833817
#define PHY_PTP_INT_STATUS 0x7FD140
834818

819+
/* ETH56G registers shared per quad */
820+
/* GPCS config register */
821+
#define PHY_GPCS_CONFIG_REG0 0x268
822+
#define PHY_GPCS_CONFIG_REG0_TX_THR_M GENMASK(27, 24)
823+
/* 1-step PTP config */
824+
#define PHY_PTP_1STEP_CONFIG 0x270
825+
#define PHY_PTP_1STEP_T1S_UP64_M GENMASK(7, 4)
826+
#define PHY_PTP_1STEP_T1S_DELTA_M GENMASK(11, 8)
827+
#define PHY_PTP_1STEP_PEER_DELAY(_quad_lane) (0x274 + 4 * (_quad_lane))
828+
#define PHY_PTP_1STEP_PD_ADD_PD_M BIT(0)
829+
#define PHY_PTP_1STEP_PD_DELAY_M GENMASK(30, 1)
830+
#define PHY_PTP_1STEP_PD_DLY_V_M BIT(31)
831+
835832
#endif /* _ICE_PTP_HW_H_ */

0 commit comments

Comments
 (0)