Skip to content

Commit 3c37ad7

Browse files
Csókás, Bencemehmetb0
Csókás, Bence
authored andcommitted
net: fec: Remove duplicated code
BugLink: https://bugs.launchpad.net/bugs/2097393 commit 713ebaed68d88121cbaf5e74104e2290a9ea74bd upstream. `fec_ptp_pps_perout()` reimplements logic already in `fec_ptp_read()`. Replace with function call. Signed-off-by: Csókás, Bence <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent bc40071 commit 3c37ad7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/net/ethernet/freescale/fec_ptp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,7 @@ static int fec_ptp_pps_perout(struct fec_enet_private *fep)
235235
timecounter_read(&fep->tc);
236236

237237
/* Get the current ptp hardware time counter */
238-
temp_val = readl(fep->hwp + FEC_ATIME_CTRL);
239-
temp_val |= FEC_T_CTRL_CAPTURE;
240-
writel(temp_val, fep->hwp + FEC_ATIME_CTRL);
241-
if (fep->quirks & FEC_QUIRK_BUG_CAPTURE)
242-
udelay(1);
243-
244-
ptp_hc = readl(fep->hwp + FEC_ATIME);
238+
ptp_hc = fec_ptp_read(&fep->cc);
245239

246240
/* Convert the ptp local counter to 1588 timestamp */
247241
curr_time = timecounter_cyc2time(&fep->tc, ptp_hc);

0 commit comments

Comments
 (0)