xref: /openbsd/sys/dev/pci/drm/include/linux/delay.h (revision 09467b48)
1 /* Public domain. */
2 
3 #ifndef _LINUX_DELAY_H
4 #define _LINUX_DELAY_H
5 
6 #include <sys/param.h>
7 
8 static inline void
9 udelay(unsigned long usecs)
10 {
11 	DELAY(usecs);
12 }
13 
14 static inline void
15 ndelay(unsigned long nsecs)
16 {
17 	DELAY(MAX(nsecs / 1000, 1));
18 }
19 
20 static inline void
21 usleep_range(unsigned long min, unsigned long max)
22 {
23 	DELAY(min);
24 }
25 
26 static inline void
27 mdelay(unsigned long msecs)
28 {
29 	int loops = msecs;
30 	while (loops--)
31 		DELAY(1000);
32 }
33 
34 #define drm_msleep(x)		mdelay(x)
35 
36 #endif
37