Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754772AbdLOHgN (ORCPT ); Fri, 15 Dec 2017 02:36:13 -0500 Received: from mga06.intel.com ([134.134.136.31]:56944 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754565AbdLOHf7 (ORCPT ); Fri, 15 Dec 2017 02:35:59 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,403,1508828400"; d="scan'208";a="158949392" From: Sagar Arun Kamble To: linux-kernel@vger.kernel.org Cc: Sagar Arun Kamble , Richard Cochran , Fugang Duan , netdev@vger.kernel.org Subject: [PATCH 19/27] net: fec: ptp: Use timecounter_reset interface Date: Fri, 15 Dec 2017 13:08:34 +0530 Message-Id: <1513323522-15021-20-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1513323522-15021-1-git-send-email-sagar.a.kamble@intel.com> References: <1513323522-15021-1-git-send-email-sagar.a.kamble@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 35 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 Cc: Richard Cochran Cc: Fugang Duan Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.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