Go to the documentation of this file.
11 #ifndef _ASM_C6X_DELAY_H
12 #define _ASM_C6X_DELAY_H
14 #include <linux/kernel.h>
18 static inline void __delay(
unsigned long loops)
23 asm volatile (
" mv .s1 %0,%1\n"
26 " cmplt .l1 1,%0,%1\n"
28 :
"+a"(loops),
"=A"(tmp));
31 static inline void _c6x_tickdelay(
unsigned int x)
35 asm volatile (
" mvc .s2 TSCL,%0\n"
36 " add .s2x %0,%1,%2\n"
41 " cmpgt .l2 0,%0,B0\n"
43 :
"=b"(
cnt),
"+a"(x),
"=b"(endcnt) : :
"B0");
47 #define C6X_NDELAY_SCALE 10
49 static inline void _ndelay(
unsigned int n)
54 static inline void _udelay(
unsigned int n)
64 #define udelay(x) _udelay((unsigned int)(x))
65 #define ndelay(x) _ndelay((unsigned int)(x))