24 #define BUS_FREQ (100 * 1000000U)
29 static unsigned long long time_last;
32 static unsigned int time_inter;
35 static inline unsigned long long get_ppc_tb (
void)
47 :
"=r"(u),
"=r"(l),
"=r"(u1));
48 return (((
unsigned long long)u) << 32) | l;
53 static int pok_arch_set_decr (
void)
55 unsigned long long time_new = time_last + time_inter;
56 unsigned long long time_cur = get_ppc_tb();
57 int delta = time_new - time_cur;
67 asm volatile (
"mtdec %0" : :
"r"(delta));
79 err = pok_arch_set_decr();
90 time_last = get_ppc_tb ();