Skip to content

Commit e5f020a

Browse files
vcgomesanguy11
authored andcommitted
igc: Remove references to SYSTIMR register
In i225, it's no longer necessary to use the SYSTIMR register to latch the timer value, the timestamp is latched when SYSTIML is read. Signed-off-by: Vinicius Costa Gomes <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 40edc73 commit e5f020a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

drivers/net/ethernet/intel/igc/igc_ptp.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ static void igc_ptp_read_i225(struct igc_adapter *adapter,
2222
struct igc_hw *hw = &adapter->hw;
2323
u32 sec, nsec;
2424

25-
/* The timestamp latches on lowest register read. For I210/I211, the
26-
* lowest register is SYSTIMR. Since we only need to provide nanosecond
27-
* resolution, we can ignore it.
28-
*/
29-
rd32(IGC_SYSTIMR);
25+
/* The timestamp is latched when SYSTIML is read. */
3026
nsec = rd32(IGC_SYSTIML);
3127
sec = rd32(IGC_SYSTIMH);
3228

@@ -39,9 +35,6 @@ static void igc_ptp_write_i225(struct igc_adapter *adapter,
3935
{
4036
struct igc_hw *hw = &adapter->hw;
4137

42-
/* Writing the SYSTIMR register is not necessary as it only
43-
* provides sub-nanosecond resolution.
44-
*/
4538
wr32(IGC_SYSTIML, ts->tv_nsec);
4639
wr32(IGC_SYSTIMH, ts->tv_sec);
4740
}
@@ -102,10 +95,9 @@ static int igc_ptp_gettimex64_i225(struct ptp_clock_info *ptp,
10295
spin_lock_irqsave(&igc->tmreg_lock, flags);
10396

10497
ptp_read_system_prets(sts);
105-
rd32(IGC_SYSTIMR);
106-
ptp_read_system_postts(sts);
10798
ts->tv_nsec = rd32(IGC_SYSTIML);
10899
ts->tv_sec = rd32(IGC_SYSTIMH);
100+
ptp_read_system_postts(sts);
109101

110102
spin_unlock_irqrestore(&igc->tmreg_lock, flags);
111103

0 commit comments

Comments
 (0)