xref: /linux/arch/parisc/include/asm/delay.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1 #ifndef _ASM_PARISC_DELAY_H
2 #define _ASM_PARISC_DELAY_H
3 
4 static __inline__ void __delay(unsigned long loops) {
5 	asm volatile(
6 	"	.balignl	64,0x34000034\n"
7 	"	addib,UV -1,%0,.\n"
8 	"	nop\n"
9 		: "=r" (loops) : "0" (loops));
10 }
11 
12 extern void __udelay(unsigned long usecs);
13 extern void __udelay_bad(unsigned long usecs);
14 
15 static inline void udelay(unsigned long usecs)
16 {
17 	if (__builtin_constant_p(usecs) && (usecs) > 20000)
18 		__udelay_bad(usecs);
19 	__udelay(usecs);
20 }
21 
22 #endif /* _ASM_PARISC_DELAY_H */
23