Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 6365900

Browse files
Csókás, Bencegregkh
Csókás, Bence
authored andcommitted
net: fec: Remove duplicated code
commit 713ebae upstream. `fec_ptp_pps_perout()` reimplements logic already in `fec_ptp_read()`. Replace with function call. Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20240812094713.2883476-2-csokas.bence@prolan.hu Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1e1eb62 commit 6365900

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/net/ethernet/freescale/fec_ptp.c

+1-7
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)