Last change
on this file was 679, checked in by David Azarewicz, 4 years ago |
Merge changes from Paul's uniaud32next branch.
|
File size:
924 bytes
|
Rev | Line | |
---|
[32] | 1 | #ifndef _LINUX_DELAY_H
|
---|
| 2 | #define _LINUX_DELAY_H
|
---|
| 3 |
|
---|
| 4 | /*
|
---|
| 5 | * Copyright (C) 1993 Linus Torvalds
|
---|
| 6 | *
|
---|
| 7 | * Delay routines, using a pre-computed "loops_per_second" value.
|
---|
| 8 | */
|
---|
| 9 |
|
---|
| 10 | extern unsigned long loops_per_sec;
|
---|
| 11 |
|
---|
| 12 | #include <asm/delay.h>
|
---|
| 13 |
|
---|
| 14 | /*
|
---|
| 15 | * Using udelay() for intervals greater than a few milliseconds can
|
---|
| 16 | * risk overflow for high loops_per_sec (high bogomips) machines. The
|
---|
| 17 | * mdelay() provides a wrapper to prevent this. For delays greater
|
---|
| 18 | * than MAX_UDELAY_MS milliseconds, the wrapper is used. Architecture
|
---|
| 19 | * specific values can be defined in asm-???/delay.h as an override.
|
---|
| 20 | * The 2nd mdelay() definition ensures GCC will optimize away the
|
---|
| 21 | * while loop for the common cases where n <= MAX_UDELAY_MS -- Paul G.
|
---|
| 22 | */
|
---|
| 23 |
|
---|
| 24 | #ifndef MAX_UDELAY_MS
|
---|
| 25 | #define MAX_UDELAY_MS 5
|
---|
| 26 | #endif
|
---|
| 27 |
|
---|
| 28 | void mdelay(unsigned long);
|
---|
| 29 |
|
---|
[679] | 30 | #define usleep_range(_min, _max) msleep((_max) / 1000)
|
---|
| 31 |
|
---|
[32] | 32 | #endif /* defined(_LINUX_DELAY_H) */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.