1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General Public 3*4882a593Smuzhiyun * License. See the file "COPYING" in the main directory of this archive 4*4882a593Smuzhiyun * for more details. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Copyright (C) 1994 by Waldorf Electronics 7*4882a593Smuzhiyun * Copyright (C) 1995 - 2000, 01, 03 by Ralf Baechle 8*4882a593Smuzhiyun * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 9*4882a593Smuzhiyun * Copyright (C) 2007 Maciej W. Rozycki 10*4882a593Smuzhiyun */ 11*4882a593Smuzhiyun #ifndef _ASM_DELAY_H 12*4882a593Smuzhiyun #define _ASM_DELAY_H 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun #include <linux/param.h> 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun extern void __delay(unsigned long loops); 17*4882a593Smuzhiyun extern void __ndelay(unsigned long ns); 18*4882a593Smuzhiyun extern void __udelay(unsigned long us); 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #define ndelay(ns) __ndelay(ns) 21*4882a593Smuzhiyun #define udelay(us) __udelay(us) 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun /* make sure "usecs *= ..." in udelay do not overflow. */ 24*4882a593Smuzhiyun #if HZ >= 1000 25*4882a593Smuzhiyun #define MAX_UDELAY_MS 1 26*4882a593Smuzhiyun #elif HZ <= 200 27*4882a593Smuzhiyun #define MAX_UDELAY_MS 5 28*4882a593Smuzhiyun #else 29*4882a593Smuzhiyun #define MAX_UDELAY_MS (1000 / HZ) 30*4882a593Smuzhiyun #endif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #endif /* _ASM_DELAY_H */ 33