Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:43 PM, Richard Cochran wrote: On Wed, Sep 14, 2016 at 11:23:43PM +0300, Grygorii Strashko wrote: if yes then those changes are correct as from patch#7 point of view, as from patch#8 because they are separate standalone changes. In patch patch#7 it reasonable to ball out earlier,

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:23:43PM +0300, Grygorii Strashko wrote: > if yes then those changes are correct as from patch#7 point of > view, as from patch#8 because they are separate standalone changes. > In patch patch#7 it reasonable to ball out earlier, while in patch#8 > it required to move for

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:08 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 11:03:18PM +0300, Grygorii Strashko wrote: >> On 09/14/2016 05:25 PM, Richard Cochran wrote: >>> On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: @@ -427,9 +427,6 @@ static void cpts_calc_mult_shift(stru

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:03:18PM +0300, Grygorii Strashko wrote: > On 09/14/2016 05:25 PM, Richard Cochran wrote: > > On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: > >> @@ -427,9 +427,6 @@ static void cpts_calc_mult_shift(struct cpts *cpts) > >>u64 ns; > >>u64 frac; >

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 05:25 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: >> @@ -427,9 +427,6 @@ static void cpts_calc_mult_shift(struct cpts *cpts) >> u64 ns; >> u64 frac; >> >> -if (cpts->cc_mult || cpts->cc.shift) >> -return;

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: > @@ -427,9 +427,6 @@ static void cpts_calc_mult_shift(struct cpts *cpts) > u64 ns; > u64 frac; > > - if (cpts->cc_mult || cpts->cc.shift) > - return; > - > freq = clk_get_rate(cpts->refclk); >

[PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
The CPTS drivers uses 8sec period for overflow checking with assumption that CPTS rftclk will not exceed 500MHz. But that's not true on some TI's platforms (Kesytone 2). As result, it is possible that CPTS counter will overflow more than once between two readings. Hence, fix it by selecting overfl