Skip to content

Commit 03cb447

Browse files
jacob-kelleranguy11
authored andcommitted
ice: add low level PTP clock access functions
Add the ice_ptp_hw.c file and some associated definitions to the ice driver folder. This file contains basic low level definitions for functions that interact with the device hardware. For now, only E810-based devices are supported. The ice hardware supports 2 major variants which have different PHYs with different procedures necessary for interacting with the device clock. Because the device captures timestamps in the PHY, each PHY has its own internal timer. The timers are synchronized in hardware by first preparing the source timer and the PHY timer shadow registers, and then issuing a synchronization command. This ensures that both the source timer and PHY timers are programmed simultaneously. The timers themselves are all driven from the same oscillator source. The functions in ice_ptp_hw.c abstract over the differences between how the PHYs in E810 are programmed vs how the PHYs in E822 devices are programmed. This series only implements E810 support, but E822 support will be added in a future change. Signed-off-by: Jacob Keller <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 7f9ab54 commit 03cb447

File tree

5 files changed

+770
-0
lines changed

5 files changed

+770
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,23 @@
433433
#define GLV_UPRCL(_i) (0x003B2000 + ((_i) * 8))
434434
#define GLV_UPTCL(_i) (0x0030A000 + ((_i) * 8))
435435
#define PRTRPB_RDPC 0x000AC260
436+
#define GLTSYN_CMD 0x00088810
437+
#define GLTSYN_CMD_SYNC 0x00088814
438+
#define GLTSYN_ENA(_i) (0x00088808 + ((_i) * 4))
439+
#define GLTSYN_ENA_TSYN_ENA_M BIT(0)
440+
#define GLTSYN_INCVAL_H(_i) (0x00088920 + ((_i) * 4))
441+
#define GLTSYN_INCVAL_L(_i) (0x00088918 + ((_i) * 4))
442+
#define GLTSYN_SHADJ_H(_i) (0x00088910 + ((_i) * 4))
443+
#define GLTSYN_SHADJ_L(_i) (0x00088908 + ((_i) * 4))
444+
#define GLTSYN_SHTIME_0(_i) (0x000888E0 + ((_i) * 4))
445+
#define GLTSYN_SHTIME_H(_i) (0x000888F0 + ((_i) * 4))
446+
#define GLTSYN_SHTIME_L(_i) (0x000888E8 + ((_i) * 4))
447+
#define GLTSYN_STAT(_i) (0x000888C0 + ((_i) * 4))
448+
#define GLTSYN_SYNC_DLAY 0x00088818
449+
#define GLTSYN_TIME_H(_i) (0x000888D8 + ((_i) * 4))
450+
#define GLTSYN_TIME_L(_i) (0x000888D0 + ((_i) * 4))
451+
#define PFTSYN_SEM 0x00088880
452+
#define PFTSYN_SEM_BUSY_M BIT(0)
436453
#define VSIQF_FD_CNT(_VSI) (0x00464000 + ((_VSI) * 4))
437454
#define VSIQF_FD_CNT_FD_GCNT_S 0
438455
#define VSIQF_FD_CNT_FD_GCNT_M ICE_M(0x3FFF, 0)

0 commit comments

Comments
 (0)