Re: [U-Boot] [PATCH] lib/time - fix "usec_to_tick" calculation for hi freq system timers

2013-12-13 Thread Alexey Brodkin
On Fri, 2013-12-13 at 09:09 -0500, Tom Rini wrote: > Please note that I'm taking http://patchwork.ozlabs.org/patch/297361/ as > the solution for this problem, thanks! > As long as it resolves overflow issue (and from that patch I'd say it should) I'm totally fine with it. Thanks. P.S. funny eno

Re: [U-Boot] [PATCH] lib/time - fix "usec_to_tick" calculation for hi freq system timers

2013-12-13 Thread Tom Rini
On Fri, Dec 13, 2013 at 08:07:51AM -0500, Tom Rini wrote: > On Fri, Dec 13, 2013 at 07:01:07AM +, Alexey Brodkin wrote: > > > Hi Tom, > > > > On Mon, 2013-12-09 at 16:57 +0400, Alexey Brodkin wrote: > > > Current implementation works fine if "usec * get_tbclk()" fits in 32 > > > bits. Otherwi

Re: [U-Boot] [PATCH] lib/time - fix "usec_to_tick" calculation for hi freq system timers

2013-12-13 Thread Tom Rini
On Fri, Dec 13, 2013 at 07:01:07AM +, Alexey Brodkin wrote: > Hi Tom, > > On Mon, 2013-12-09 at 16:57 +0400, Alexey Brodkin wrote: > > Current implementation works fine if "usec * get_tbclk()" fits in 32 > > bits. Otherwise result will be cut down to 32-bit. > > > > Fix is obvious - first ex

Re: [U-Boot] [PATCH] lib/time - fix "usec_to_tick" calculation for hi freq system timers

2013-12-12 Thread Alexey Brodkin
Hi Tom, On Mon, 2013-12-09 at 16:57 +0400, Alexey Brodkin wrote: > Current implementation works fine if "usec * get_tbclk()" fits in 32 > bits. Otherwise result will be cut down to 32-bit. > > Fix is obvious - first extend data type of either operand. > > Signed-off-by: Alexey Brodkin > > Cc:

[U-Boot] [PATCH] lib/time - fix "usec_to_tick" calculation for hi freq system timers

2013-12-09 Thread Alexey Brodkin
Current implementation works fine if "usec * get_tbclk()" fits in 32 bits. Otherwise result will be cut down to 32-bit. Fix is obvious - first extend data type of either operand. Signed-off-by: Alexey Brodkin Cc: Rob Herring Cc: Mischa Jonker --- lib/time.c | 2 +- 1 file changed, 1 insertio