2005-04-17 00:20:36 +02:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1994 by Waldorf Electronics
|
|
|
|
* Copyright (C) 1995 - 2000, 01, 03 by Ralf Baechle
|
|
|
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
2007-10-23 13:43:11 +02:00
|
|
|
* Copyright (C) 2007 Maciej W. Rozycki
|
2005-04-17 00:20:36 +02:00
|
|
|
*/
|
|
|
|
#ifndef _ASM_DELAY_H
|
|
|
|
#define _ASM_DELAY_H
|
|
|
|
|
2009-08-28 13:29:58 +02:00
|
|
|
#include <linux/param.h>
|
|
|
|
|
2009-02-28 10:44:28 +01:00
|
|
|
extern void __delay(unsigned int loops);
|
|
|
|
extern void __ndelay(unsigned int ns);
|
|
|
|
extern void __udelay(unsigned int us);
|
2007-10-23 13:43:11 +02:00
|
|
|
|
2009-06-12 18:28:00 +02:00
|
|
|
#define ndelay(ns) __ndelay(ns)
|
2009-02-28 10:44:28 +01:00
|
|
|
#define udelay(us) __udelay(us)
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2005-11-04 18:02:54 +01:00
|
|
|
/* make sure "usecs *= ..." in udelay do not overflow. */
|
|
|
|
#if HZ >= 1000
|
|
|
|
#define MAX_UDELAY_MS 1
|
|
|
|
#elif HZ <= 200
|
|
|
|
#define MAX_UDELAY_MS 5
|
|
|
|
#else
|
|
|
|
#define MAX_UDELAY_MS (1000 / HZ)
|
|
|
|
#endif
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
#endif /* _ASM_DELAY_H */
|