aboutsummaryrefslogtreecommitdiff
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-20 14:49:36 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-01-28 13:18:49 +0900
commit99432700cf2f28976191ab546deffc0007ef4eb7 (patch)
treef472c1aebbf3215f6c69c0c110816fea835bae7d /include/asm-sh
parent600ee240d15e535d51e6c2b2f8475f0aa42885ea (diff)
sh: Tidy up lib64 udelay impl.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/delay.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-sh/delay.h b/include/asm-sh/delay.h
index db599b2a5a9..031db84f2aa 100644
--- a/include/asm-sh/delay.h
+++ b/include/asm-sh/delay.h
@@ -6,7 +6,7 @@
*
* Delay routines calling functions in arch/sh/lib/delay.c
*/
-
+
extern void __bad_udelay(void);
extern void __bad_ndelay(void);
@@ -15,13 +15,17 @@ extern void __ndelay(unsigned long nsecs);
extern void __const_udelay(unsigned long usecs);
extern void __delay(unsigned long loops);
+#ifdef CONFIG_SUPERH32
#define udelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
__udelay(n))
-
#define ndelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
__ndelay(n))
+#else
+extern void udelay(unsigned long usecs);
+extern void ndelay(unsigned long nsecs);
+#endif
#endif /* __ASM_SH_DELAY_H */