mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
qca: ipq: fix to correct wrong delay obtained from udelay function
If usec >= 224000 usec, then:
usec * GPT_FREQ_KHZ = 224000 * 19200 >= 0x100590000,
which is a 33 bits value
To fix this usec is typecasted to 64 bit
(unsigned long long)usec * GPT_FREQ_KHZ
Change-Id: Ib1642d39b0581d2c04c62e415a1fd2dfed47fff1
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
(cherry picked from commit 72d8ec613f)
This commit is contained in:
parent
0f14227714
commit
0e060c4f91
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ void __udelay(unsigned long usec)
|
|||
if (usec == 0)
|
||||
return;
|
||||
|
||||
val = (usec * GPT_FREQ_KHZ) / 1000;
|
||||
val = ((unsigned long long)usec * GPT_FREQ_KHZ) / 1000;
|
||||
if (val == 0 )
|
||||
val = 1; /* Wait for atleast 1 tick */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue