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