projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4374a1f
)
net: fec: Remove duplicated code
author
Csókás, Bence
<csokas.bence@prolan.hu>
Mon, 12 Aug 2024 09:47:15 +0000
(11:47 +0200)
committer
Jakub Kicinski
<kuba@kernel.org>
Wed, 14 Aug 2024 02:17:01 +0000
(19:17 -0700)
`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>
drivers/net/ethernet/freescale/fec_ptp.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/freescale/fec_ptp.c
b/drivers/net/ethernet/freescale/fec_ptp.c
index 7f4ccd1ade5b1436d4e85db16d48f044a365689d..4cffda363a148e0c170d07aadbd83cb2aec411a0 100644
(file)
--- a/
drivers/net/ethernet/freescale/fec_ptp.c
+++ b/
drivers/net/ethernet/freescale/fec_ptp.c
@@
-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);