From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932692AbcK3JNK (ORCPT ); Wed, 30 Nov 2016 04:13:10 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34332 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755815AbcK3JNE (ORCPT ); Wed, 30 Nov 2016 04:13:04 -0500 Date: Wed, 30 Nov 2016 10:12:58 +0100 From: Richard Cochran To: Grygorii Strashko Cc: "David S. Miller" , netdev@vger.kernel.org, Mugunthan V N , Sekhar Nori , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, Murali Karicheri , Wingman Kwok , John Stultz , Thomas Gleixner Subject: Re: [PATCH v2 13/13] net: ethernet: ti: cpts: fix overflow check period Message-ID: <20161130091258.GA28680@localhost.localdomain> References: <20161128230337.6731-1-grygorii.strashko@ti.com> <20161128230337.6731-14-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128230337.6731-14-grygorii.strashko@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 28, 2016 at 05:03:37PM -0600, Grygorii Strashko wrote: > The CPTS drivers uses 8sec period for overflow checking with > assumption that CPTS retclk will not exceed 500MHz. But that's not > true on some TI platforms (Kesytone 2). As result, it is possible that > CPTS counter will overflow more than once between two readings. > > Hence, fix it by selecting overflow check period dynamically as > max_sec_before_overflow/2, where > max_sec_before_overflow = max_counter_val / rftclk_freq. > > Cc: John Stultz > Cc: Thomas Gleixner > Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran