]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: Fix __udelay calculation
authorMischa Jonker <mjonker@synopsys.com>
Fri, 30 Aug 2013 09:56:25 +0000 (11:56 +0200)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 5 Sep 2013 05:01:12 +0000 (10:31 +0530)
commita5f13ac2e21e4496a477d8645f51cf9a9c2d375c
tree368a10f49fae6386d201154b6a628cf7b4c01e67
parent95b97875f9297fa17bda872ff3db9211647cc2fe
ARC: Fix __udelay calculation

Cast usecs to u64, to ensure that the (usecs * 4295 * HZ)
multiplication is 64 bit.

Initially, the (usecs * 4295 * HZ) part was done as a 32 bit
multiplication, with the result casted to 64 bit. This led to some bits
falling off, causing a "DMA initialization error" in the stmmac Ethernet
driver, due to a premature timeout.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/delay.h