aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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 db599b2a5a9c..031db84f2aa1 100644
--- a/include/asm-sh/delay.h
+++ b/include/asm-sh/delay.h
@@ -6,7 +6,7 @@
6 * 6 *
7 * Delay routines calling functions in arch/sh/lib/delay.c 7 * Delay routines calling functions in arch/sh/lib/delay.c
8 */ 8 */
9 9
10extern void __bad_udelay(void); 10extern void __bad_udelay(void);
11extern void __bad_ndelay(void); 11extern void __bad_ndelay(void);
12 12
@@ -15,13 +15,17 @@ extern void __ndelay(unsigned long nsecs);
15extern void __const_udelay(unsigned long usecs); 15extern void __const_udelay(unsigned long usecs);
16extern void __delay(unsigned long loops); 16extern void __delay(unsigned long loops);
17 17
18#ifdef CONFIG_SUPERH32
18#define udelay(n) (__builtin_constant_p(n) ? \ 19#define udelay(n) (__builtin_constant_p(n) ? \
19 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \ 20 ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
20 __udelay(n)) 21 __udelay(n))
21 22
22
23#define ndelay(n) (__builtin_constant_p(n) ? \ 23#define ndelay(n) (__builtin_constant_p(n) ? \
24 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ 24 ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
25 __ndelay(n)) 25 __ndelay(n))
26#else
27extern void udelay(unsigned long usecs);
28extern void ndelay(unsigned long nsecs);
29#endif
26 30
27#endif /* __ASM_SH_DELAY_H */ 31#endif /* __ASM_SH_DELAY_H */