aboutsummaryrefslogtreecommitdiffstats
path: root/udelay.h
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2002-04-29 11:00:28 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2002-04-29 11:00:28 +0000
commite0bc8f47b964169bcbec3ce14d1aca38bc024cee (patch)
treef8b0a611d773d5bd691d9156392ee3704d79d2fc /udelay.h
parentc9a403a8364c906a54c24a9465299bb7e45e53f6 (diff)
downloadlcd4linux-e0bc8f47b964169bcbec3ce14d1aca38bc024cee.tar.gz
[lcd4linux @ 2002-04-29 11:00:25 by reinelt]
added Toshiba T6963 driver added ndelay() with nanosecond resolution git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@152 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'udelay.h')
-rw-r--r--udelay.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/udelay.h b/udelay.h
index 3cec137..cd7e93c 100644
--- a/udelay.h
+++ b/udelay.h
@@ -1,4 +1,4 @@
-/* $Id: udelay.h,v 1.3 2001/03/12 13:44:58 reinelt Exp $
+/* $Id: udelay.h,v 1.4 2002/04/29 11:00:28 reinelt Exp $
*
* short delays
*
@@ -20,6 +20,11 @@
*
*
* $Log: udelay.h,v $
+ * Revision 1.4 2002/04/29 11:00:28 reinelt
+ *
+ * added Toshiba T6963 driver
+ * added ndelay() with nanosecond resolution
+ *
* Revision 1.3 2001/03/12 13:44:58 reinelt
*
* new udelay() using Time Stamp Counters
@@ -41,17 +46,27 @@
#ifndef _UDELAY_H_
#define _UDELAY_H_
+/* stolen from linux/asm-i386/processor.h */
+/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
+static inline void rep_nop(void)
+{
+ __asm__ __volatile__("rep;nop");
+}
+
+
#ifdef USE_OLD_UDELAY
extern unsigned long loops_per_usec;
-
-void udelay (unsigned long usec);
void udelay_calibrate (void);
#else
void udelay_init (void);
-void udelay (unsigned long usec);
#endif
+
+void ndelay (unsigned long nsec);
+
+#define udelay(usec) ndelay(usec*1000)
+
#endif