2 Copyright © 2008-2014, The AROS Development Team. All rights reserved.
10 #include "timer_intern.h"
12 #define TIMEBASE_FREQUENCY 33000000
14 extern uint32_t tbc_expected
;
15 extern uint32_t tbc_achieved
;
18 void EClockUpdate(struct TimerBase
*TimerBase
);
19 void EClockSet(struct TimerBase
*TimerBase
);
20 void TimerSetup(struct TimerBase
*TimerBase
, uint32_t waste
);
22 static volatile uint32_t mftbl()
26 asm volatile("mftb %0":"=r"(tb
));
31 static inline uint64_t mftb()
36 asm volatile("mftbu %0; mftb %1; mftbu %2":"=r"(hi
),"=r"(lo
),"=r"(tmp
));
39 return (((uint64_t)hi
) << 32) | ((uint64_t)lo
);
42 #endif /* LOWLEVEL_H_ */