summaryrefslogtreecommitdiff
path: root/cpu/pxa/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/pxa/interrupts.c')
-rw-r--r--cpu/pxa/interrupts.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cpu/pxa/interrupts.c b/cpu/pxa/interrupts.c
index 8aec0b9dd6..fd02154b86 100644
--- a/cpu/pxa/interrupts.c
+++ b/cpu/pxa/interrupts.c
@@ -193,9 +193,14 @@ void udelay_masked (unsigned long usec)
{
ulong tmo;
- tmo = usec / 1000;
- tmo *= CFG_HZ;
- tmo /= 1000;
+ if (usec >= 1000) {
+ tmo = usec / 1000;
+ tmo *= CFG_HZ;
+ tmo /= 1000;
+ } else {
+ tmo = usec * CFG_HZ;
+ tmo /= (1000*1000);
+ }
reset_timer_masked ();