From patchwork Thu Nov 7 20:01:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 178821 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1560486ilf; Thu, 7 Nov 2019 12:02:07 -0800 (PST) X-Google-Smtp-Source: APXvYqy7+KVJhFXx0G2JHYUfI/Y4q2muq8p0OOm/T/neIPgYJYKlbjFq2OcndMZDnUoWuUzkGpyl X-Received: by 2002:a50:fa8a:: with SMTP id w10mr5745185edr.179.1573156927769; Thu, 07 Nov 2019 12:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573156927; cv=none; d=google.com; s=arc-20160816; b=t6BLIz+0E9mPU/Hn/+4tXZjvjXYin+hfIVTfcyyfDOrXAEELn17Hy4IA5spDjVY6cO FKDJ9vTEoFfJUh0F5A46IFBmDdwoY9lEUpYJXwUM++C2PNY35CBNVKsDD63k67+jo/rQ PzYMnNyprl/i7YGgTpJ+jdQjkyRioZ3eSzhUXKEEkrmuAWkImnx242MzifsHB+IG6NqT lRdVPb6harnRYqRd1zzkvCKprAmu6ft34CZGNM3ZaYFjEjJgY5bYYsrl8ZRI3tYlHyiP REhq92f37+JI/pLheXzjnkJK4Sm82gGL/A8JTF8Hd8vQstEw+qlG09ffSkMkwO4cD6y3 +YQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sWK1iMgmuXL7Tb2eplZGx/oC/uSa+BZBKZskoo3wBq0=; b=m22rx8AxuwntkLQo0EG9Xr2HHh6h7IpjXFykdI3AWSFSg+H56wweEiO0C5L4tI3fkA XU+Rw3cAmnhu/f8h/YHkIRKP2gR/gMLZOz5iCLCpaRU3Knjja/CDeDOd9qsf07GR2FCu RPHFkMos3RcfoNX2msTNNeqo9U0rEqqfAQ9w/CzA1gHXoMDXWOcbxUOT3paJwQejQ7Yb /daVVhW6INySJPW/yDE9wxlFWSPFg1S1pfSK46wgRULEf5iZf27xsTQ+AY/i/5VFv2Um Yj6vCnnovrpTnXlFglQKvwf/SkYfswtGMIb02yMGA3dNLD9UscpC0RsR53d6dDJgVnOV RoWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MF2FHnqw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si2172123ejk.81.2019.11.07.12.02.07; Thu, 07 Nov 2019 12:02:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MF2FHnqw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727128AbfKGUCE (ORCPT + 26 others); Thu, 7 Nov 2019 15:02:04 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46745 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbfKGUCE (ORCPT ); Thu, 7 Nov 2019 15:02:04 -0500 Received: by mail-lj1-f193.google.com with SMTP id e9so3627851ljp.13 for ; Thu, 07 Nov 2019 12:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sWK1iMgmuXL7Tb2eplZGx/oC/uSa+BZBKZskoo3wBq0=; b=MF2FHnqwNpUU1MM46hHcSNiI6UcalrGXvlUZZJVBIEDtW3mJ/3BnVsPCaQRozU6h/D SzbLKGbfe3Y9im4AX468u9BQakpwU1En4z3SEZJPh3JGItTTaScDLLub68CTsu0a40L1 mnbkcSOyESoO9UabUIb3+z6zWPWxkUNy1KTMZ4ru3NIAx0qjddLKybg4qVb8OAqjVPnw sSMdWzo+eTj8Fjt8DyimLKrsLowsAI+GWR0nAyxjdH1sUTYW6NlimklxiBM1+a4S6qbN ++HoFBULs4/iDx8ql7MrWNeTdRLTDkg21S9uMLSgQzu1GYNqxp0wI1YD3FqYjZpld6z4 mYqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sWK1iMgmuXL7Tb2eplZGx/oC/uSa+BZBKZskoo3wBq0=; b=fyOKwhqeHVmP4RtgwxKB40wgAHR8gJnuUUAnf8dQfPhPVkwbpOQpBtYHE35uBLQVCh VHDipMCGW78MFPR9OWmenPU4SNetlwBRPPURAeHtnxfUUZtrDC4Pcv1K43y9vauzVu86 LPh+H5ATqMdeDtdbZnPmoLyk7o1spHtP3O2BhS2bkUjWdXwsmz/tfCL6YMfCgJrXbLvP k5q5cN6AR5u4UrBStMngWI3hLVQygo13M8CkXqsu2PTVj2uva435S4cDS7CAgauoNleT CbJegBbM6v4tq8h2BA1qI9X6Uhx/ub0L0cea/KBnEQwZAHUizBEGeYKyHtBHdekpLw5C XlIw== X-Gm-Message-State: APjAAAXVAxX34aIt1CTWFM0uS0ilEqFBsGNGV2B+4wHpG2Oj/6abSWU8 FxP1TsK+WNmZIEd/5+mIfh9vDA== X-Received: by 2002:a05:651c:326:: with SMTP id b6mr3807356ljp.119.1573156922048; Thu, 07 Nov 2019 12:02:02 -0800 (PST) Received: from localhost.localdomain (57-201-94-178.pool.ukrtel.net. [178.94.201.57]) by smtp.gmail.com with ESMTPSA id q24sm1259746ljm.76.2019.11.07.12.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 12:02:01 -0800 (PST) From: Ivan Khoronzhuk To: davem@davemloft.net, grygorii.strashko@ti.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next] ethernet: ti: cpts: use ktime_get_real_ns helper Date: Thu, 7 Nov 2019 22:01:58 +0200 Message-Id: <20191107200158.25978-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update on more short variant for getting real clock in ns. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index 61136428e2c0..729ce09dded9 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -459,7 +459,7 @@ int cpts_register(struct cpts *cpts) cpts_write32(cpts, CPTS_EN, control); cpts_write32(cpts, TS_PEND_EN, int_enable); - timecounter_init(&cpts->tc, &cpts->cc, ktime_to_ns(ktime_get_real())); + timecounter_init(&cpts->tc, &cpts->cc, ktime_get_real_ns()); cpts->clock = ptp_clock_register(&cpts->info, cpts->dev); if (IS_ERR(cpts->clock)) {