9 uint64_t (*read
)(void);
15 static inline uint32_t cyc2ns(struct clocksource
*cs
, uint64_t cycles
)
17 uint64_t ret
= cycles
;
18 ret
= (ret
* cs
->mult
) >> cs
->shift
;
22 int init_clock(struct clocksource
*);
24 uint64_t get_time_ns(void);
26 uint32_t clocksource_hz2mult(uint32_t hz
, uint32_t shift_constant
);
28 int is_timeout(uint64_t start_ns
, uint64_t time_offset_ns
);
30 // void udelay(unsigned long usecs);
32 void ndelay(unsigned long nsecs
);
33 void mdelay(unsigned long msecs
);
35 #define SECOND ((uint64_t)(1000 * 1000 * 1000))
36 #define MSECOND ((uint64_t)(1000 * 1000))
37 #define USECOND ((uint64_t)(1000))