4 * Created on: Sep 30, 2008
12 #include "timer_intern.h"
14 #define TIMEBASE_FREQUENCY 33000000
16 void EClockUpdate(struct TimerBase
*TimerBase
);
17 void EClockSet(struct TimerBase
*TimerBase
);
18 void TimerSetup(struct TimerBase
*TimerBase
, uint32_t waste
);
20 static volatile uint32_t mftbl()
24 asm volatile("mftb %0":"=r"(tb
));
29 static inline uint64_t mftb()
34 asm volatile("mftbu %0; mftb %1; mftbu %2":"=r"(hi
),"=r"(lo
),"=r"(tmp
));
37 return (((uint64_t)hi
) << 32) | ((uint64_t)lo
);
40 #endif /* LOWLEVEL_H_ */