Go to the documentation of this file.
12 #ifndef _XTENSA_DELAY_H
13 #define _XTENSA_DELAY_H
15 #include <asm/processor.h>
16 #include <asm/param.h>
20 static inline void __delay(
unsigned long loops)
23 __asm__ __volatile__ (
"1: addi %0, %0, -2; bgeui %0, 2, 1b"
24 :
"=r" (loops) :
"0" (loops));
30 asm volatile (
"rsr %0, ccount\n" :
"=r" (ccount));
40 unsigned long start = xtensa_get_ccount();
44 while (((
unsigned long)xtensa_get_ccount()) -
start < cycles)