4 #define CPU_FTR_601 0x00000100
6 #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
8 typedef uint64_t cycles_t
;
10 /* On ppc64 this gets us the whole timebase; on ppc32 just the lower half */
11 static inline unsigned long get_tbl(void)
15 //#if defined(CONFIG_403GCX)
16 // asm volatile("mfspr %0, 0x3dd" : "=r" (tbl));
18 asm volatile("mftb %0" : "=r" (tbl
));
23 static inline unsigned int get_tbu(void)
27 //#if defined(CONFIG_403GCX)
28 // asm volatile("mfspr %0, 0x3dc" : "=r" (tbu));
30 asm volatile("mftbu %0" : "=r" (tbu
));
35 static inline uint64_t get_tb(void)
37 unsigned int tbhi
, tblo
, tbhi2
;
43 } while (tbhi
!= tbhi2
);
45 return ((uint64_t)tbhi
<< 32) | tblo
;
48 static inline cycles_t
get_cycles(void)
53 #endif //__TIMEX_PPC_H
This page took 0.029593 seconds and 4 git commands to generate.