summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2013-08-17 20:56:33 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:41:36 -0700
commitc6bc8f15bb63294a038c8abbcad77c064da87e4c (patch)
treea981860ba4a3c229c8e67415857e86186f50c879 /arch/arm/lib
parent5c6bb4731c1303e787367d764716ef983d76a54e (diff)
ARM: Honor udelay convention for timer-based delay
Replaced strict "below" comparison in timer delay function with "below or equal". The former may result in actual delay time below requested (if the delay happens to start just before cycle counter advance). The latter guarantees actual delay at/above requested. Change-Id: I8cf87836e37647997ca6480c2476255369e8953d Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/262858 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Bo Yan <byan@nvidia.com>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/delay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c
index 64dbfa57204a..748c228d7126 100644
--- a/arch/arm/lib/delay.c
+++ b/arch/arm/lib/delay.c
@@ -51,7 +51,7 @@ static void __timer_delay(unsigned long cycles)
{
cycles_t start = get_cycles();
- while ((get_cycles() - start) < cycles)
+ while ((get_cycles() - start) <= cycles)
cpu_relax();
}