Go to the documentation of this file.
13 #ifndef _ASM_MICROBLAZE_DELAY_H
14 #define _ASM_MICROBLAZE_DELAY_H
16 extern inline void __delay(
unsigned long loops)
18 asm volatile (
"# __delay \n\t" \
19 "1: addi %0, %0, -1\t\n" \
39 #define __MAX_UDELAY (226050910UL/HZ)
40 #define __MAX_NDELAY (4294967295UL/HZ)
47 unsigned long long tmp =
50 unsigned loops = tmp >> 32;
62 #define udelay(n) (__builtin_constant_p(n) ? \
63 ((n) > __MAX_UDELAY ? __bad_udelay() : __udelay((n) * (19 * HZ))) : \
64 __udelay((n) * (19 * HZ)))
66 #define ndelay(n) (__builtin_constant_p(n) ? \
67 ((n) > __MAX_NDELAY ? __bad_ndelay() : __udelay((n) * HZ)) : \
70 #define muldiv(a, b, c) (((a)*(b))/(c))