File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 12
12
#ifndef _XTENSA_DELAY_H
13
13
#define _XTENSA_DELAY_H
14
14
15
- #include <asm/processor .h>
15
+ #include <asm/timex .h>
16
16
#include <asm/param.h>
17
17
18
18
extern unsigned long loops_per_jiffy ;
@@ -24,24 +24,17 @@ static inline void __delay(unsigned long loops)
24
24
: "=r" (loops ) : "0" (loops ));
25
25
}
26
26
27
- static __inline__ u32 xtensa_get_ccount (void )
28
- {
29
- u32 ccount ;
30
- asm volatile ("rsr %0, ccount\n" : "=r" (ccount ));
31
- return ccount ;
32
- }
33
-
34
27
/* For SMP/NUMA systems, change boot_cpu_data to something like
35
28
* local_cpu_data->... where local_cpu_data points to the current
36
29
* cpu. */
37
30
38
31
static __inline__ void udelay (unsigned long usecs )
39
32
{
40
- unsigned long start = xtensa_get_ccount ();
33
+ unsigned long start = get_ccount ();
41
34
unsigned long cycles = usecs * (loops_per_jiffy / (1000000UL / HZ ));
42
35
43
36
/* Note: all variables are unsigned (can wrap around)! */
44
- while (((unsigned long )xtensa_get_ccount ()) - start < cycles )
37
+ while (((unsigned long )get_ccount ()) - start < cycles )
45
38
;
46
39
}
47
40
Original file line number Diff line number Diff line change 1
- #include <asm/delay.h>
2
1
#include <asm/timex.h>
3
2
#include <asm/io.h>
4
3
#include <variant/hardware.h>
@@ -17,7 +16,7 @@ void platform_calibrate_ccount(void)
17
16
"1: l32i %0, %2, 0 ;"
18
17
" beq %0, %1, 1b ;"
19
18
: "=&a" (u ) : "a" (t ), "a" (tstamp ));
20
- b = xtensa_get_ccount ();
19
+ b = get_ccount ();
21
20
if (i == LOOPS )
22
21
a = b ;
23
22
} while (-- i >= 0 );
You can’t perform that action at this time.
0 commit comments