Skip to content

Commit

Permalink
net: fec: Remove duplicated code
Browse files Browse the repository at this point in the history
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 <[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]>
  • Loading branch information
Csókás, Bence authored and gregkh committed Oct 22, 2024
1 parent 1e1eb62 commit 6365900
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/net/ethernet/freescale/fec_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,7 @@ static int fec_ptp_pps_perout(struct fec_enet_private *fep)
timecounter_read(&fep->tc);

/* Get the current ptp hardware time counter */
temp_val = readl(fep->hwp + FEC_ATIME_CTRL);
temp_val |= FEC_T_CTRL_CAPTURE;
writel(temp_val, fep->hwp + FEC_ATIME_CTRL);
if (fep->quirks & FEC_QUIRK_BUG_CAPTURE)
udelay(1);

ptp_hc = readl(fep->hwp + FEC_ATIME);
ptp_hc = fec_ptp_read(&fep->cc);

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

0 comments on commit 6365900

Please sign in to comment.