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