Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _CRIS_DELAY_H |
| 2 | #define _CRIS_DELAY_H |
| 3 | |
| 4 | /* |
| 5 | * Copyright (C) 1998-2002 Axis Communications AB |
| 6 | * |
| 7 | * Delay routines, using a pre-computed "loops_per_second" value. |
| 8 | */ |
| 9 | |
| 10 | #include <asm/arch/delay.h> |
| 11 | |
| 12 | /* Use only for very small delays ( < 1 msec). */ |
| 13 | |
| 14 | extern unsigned long loops_per_usec; /* arch/cris/mm/init.c */ |
| 15 | |
Jesper Nilsson | b43890a | 2008-01-21 16:38:41 +0100 | [diff] [blame] | 16 | /* May be defined by arch/delay.h. */ |
| 17 | #ifndef udelay |
Adrian Bunk | d9b5444 | 2005-11-07 00:58:44 -0800 | [diff] [blame] | 18 | static inline void udelay(unsigned long usecs) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | { |
| 20 | __delay(usecs * loops_per_usec); |
| 21 | } |
Jesper Nilsson | b43890a | 2008-01-21 16:38:41 +0100 | [diff] [blame] | 22 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
| 24 | #endif /* defined(_CRIS_DELAY_H) */ |
| 25 | |
| 26 | |
| 27 | |