]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/um/sys-i386/delay.c
[PATCH] uml: s390 preparation, delay moved to arch
[linux-2.6-omap-h63xx.git] / arch / um / sys-i386 / delay.c
1 #include "linux/delay.h"
2 #include "asm/param.h"
3
4 void __delay(unsigned long time)
5 {
6         /* Stolen from the i386 __loop_delay */
7         int d0;
8         __asm__ __volatile__(
9                 "\tjmp 1f\n"
10                 ".align 16\n"
11                 "1:\tjmp 2f\n"
12                 ".align 16\n"
13                 "2:\tdecl %0\n\tjns 2b"
14                 :"=&a" (d0)
15                 :"0" (time));
16 }
17
18 void __udelay(unsigned long usecs)
19 {
20         int i, n;
21
22         n = (loops_per_jiffy * HZ * usecs) / MILLION;
23         for(i=0;i<n;i++) ;
24 }
25
26 void __const_udelay(unsigned long usecs)
27 {
28         int i, n;
29
30         n = (loops_per_jiffy * HZ * usecs) / MILLION;
31         for(i=0;i<n;i++) ;
32 }