ARC: Fix __udelay calculation
commit186417e98f654632ab6fee35e3663cd396325360
authorMischa Jonker <mjonker@synopsys.com>
Fri, 30 Aug 2013 09:56:25 +0000 (30 11:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Oct 2013 17:54:55 +0000 (18 10:54 -0700)
tree0f89b1f7700dd612e1b4ea7820f71f4609db2015
parent09e39ab45cf8f9affdbab2837a0db34f76f55723
ARC: Fix __udelay calculation

commit 7efd0da2d17360e1cef91507dbe619db0ee2c691 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/include/asm/delay.h