[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1513323522-15021-20-git-send-email-sagar.a.kamble@intel.com>
Date: Fri, 15 Dec 2017 13:08:34 +0530
From: Sagar Arun Kamble <sagar.a.kamble@...el.com>
To: linux-kernel@...r.kernel.org
Cc: Sagar Arun Kamble <sagar.a.kamble@...el.com>,
Richard Cochran <richardcochran@...il.com>,
Fugang Duan <fugang.duan@....com>, netdev@...r.kernel.org
Subject: [PATCH 19/27] net: fec: ptp: Use timecounter_reset interface
With new interface timecounter_reset we can update the start time for
timecounter. Update fec_ptp_settime with this new function.
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@...el.com>
Cc: Richard Cochran <richardcochran@...il.com>
Cc: Fugang Duan <fugang.duan@....com>
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
drivers/net/ethernet/freescale/fec_ptp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 1ba7216..d03ea0e 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -419,7 +419,6 @@ static int fec_ptp_settime(struct ptp_clock_info *ptp,
{
struct fec_enet_private *fep =
container_of(ptp, struct fec_enet_private, ptp_caps);
-
u64 ns;
unsigned long flags;
u32 counter;
@@ -439,7 +438,7 @@ static int fec_ptp_settime(struct ptp_clock_info *ptp,
spin_lock_irqsave(&fep->tmreg_lock, flags);
writel(counter, fep->hwp + FEC_ATIME);
- timecounter_init(&fep->tc, ns);
+ timecounter_reset(&fep->tc, ns);
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
mutex_unlock(&fep->ptp_clk_mutex);
return 0;
--
1.9.1
Powered by blists - more mailing lists