source: cmedia/trunk/Include/Linux/delay.h

Last change on this file was 354, checked in by stevenhl, 17 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 1.0 KB
Line 
1/* $Id: delay.h,v 1.2 2000/05/28 16:50:43 sandervl Exp $ */
2
3#ifndef _LINUX_DELAY_H
4#define _LINUX_DELAY_H
5
6/*
7 * Copyright (C) 1993 Linus Torvalds
8 *
9 * Delay routines, using a pre-computed "loops_per_second" value.
10 */
11
12extern unsigned long loops_per_sec;
13
14#include <asm/delay.h>
15
16/*
17 * Using udelay() for intervals greater than a few milliseconds can
18 * risk overflow for high loops_per_sec (high bogomips) machines. The
19 * mdelay() provides a wrapper to prevent this. For delays greater
20 * than MAX_UDELAY_MS milliseconds, the wrapper is used. Architecture
21 * specific values can be defined in asm-???/delay.h as an override.
22 * The 2nd mdelay() definition ensures GCC will optimize away the
23 * while loop for the common cases where n <= MAX_UDELAY_MS -- Paul G.
24 */
25
26#ifndef MAX_UDELAY_MS
27#define MAX_UDELAY_MS 5
28#endif
29
30void iodelay32(unsigned long);
31#pragma aux iodelay32 parm nomemory [ecx] modify nomemory exact [eax ecx];
32
33#define mdelay(n) iodelay32(n*2)
34
35#endif /* defined(_LINUX_DELAY_H) */
Note: See TracBrowser for help on using the repository browser.