From: Frank Li <Frank.li@nxp.com>
To: "Csókás, Bence" <csokas.bence@prolan.hu>
Cc: imx@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Wei Fang <wei.fang@nxp.com>,
Shenwei Wang <shenwei.wang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH resubmit net 2/2] net: fec: Remove duplicated code
Date: Wed, 7 Aug 2024 10:02:17 -0400 [thread overview]
Message-ID: <ZrN+affnZLC2CmEl@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20240807082918.2558282-2-csokas.bence@prolan.hu>
On Wed, Aug 07, 2024 at 10:29:19AM +0200, Csókás, Bence wrote:
> `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: Frank Li <Frank.Li@nxp.com>
> ---
> drivers/net/ethernet/freescale/fec_ptp.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
> index fdbf61069a05..91b0804142e4 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -213,13 +213,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);
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2024-08-07 14:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 8:29 [PATCH resubmit net 1/2] net: fec: Forward-declare `fec_ptp_read()` Csókás, Bence
2024-08-07 8:29 ` [PATCH resubmit net 2/2] net: fec: Remove duplicated code Csókás, Bence
2024-08-07 13:54 ` Andrew Lunn
2024-08-07 14:02 ` Frank Li [this message]
2024-08-07 8:35 ` [PATCH resubmit net 1/2] net: fec: Forward-declare `fec_ptp_read()` Csókás Bence
2024-08-07 13:53 ` Andrew Lunn
2024-08-08 9:41 ` Simon Horman
2024-08-08 9:49 ` Csókás Bence
2024-08-08 11:37 ` Simon Horman
2024-08-08 13:33 ` Andrew Lunn
2024-08-07 14:01 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrN+affnZLC2CmEl@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=csokas.bence@prolan.hu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®