8 #define CPU_FTR_601 0x00000100
10 #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
12 typedef uint64_t cycles_t
;
14 /* On ppc64 this gets us the whole timebase; on ppc32 just the lower half */
15 static inline unsigned long get_tbl(void)
19 //#if defined(CONFIG_403GCX)
20 // asm volatile("mfspr %0, 0x3dd" : "=r" (tbl));
22 asm volatile("mftb %0" : "=r" (tbl
));
27 static inline unsigned int get_tbu(void)
31 //#if defined(CONFIG_403GCX)
32 // asm volatile("mfspr %0, 0x3dc" : "=r" (tbu));
34 asm volatile("mftbu %0" : "=r" (tbu
));
39 static inline uint64_t get_tb(void)
41 unsigned int tbhi
, tblo
, tbhi2
;
47 } while (tbhi
!= tbhi2
);
49 return ((uint64_t)tbhi
<< 32) | tblo
;
52 static inline cycles_t
get_cycles(void)
58 } /* end of extern "C" */
61 #endif //__TIMEX_PPC_H
This page took 0.044078 seconds and 4 git commands to generate.