sandbox: convert to common time functions
Convert sandbox to use common time functions. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
This commit is contained in:
parent
65ba7add0d
commit
28c860b23f
@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ulong get_tbclk(void)
|
unsigned long timer_read_counter(void)
|
||||||
{
|
{
|
||||||
return CONFIG_SYS_HZ;
|
return os_get_nsec() / 1000;
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long long get_ticks(void)
|
|
||||||
{
|
|
||||||
return get_timer(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
ulong get_timer(ulong base)
|
|
||||||
{
|
|
||||||
return (os_get_nsec() / 1000000) - base;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int timer_init(void)
|
int timer_init(void)
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define CONFIG_SYS_TIMER_RATE 1000000
|
||||||
|
|
||||||
#define CONFIG_BOOTSTAGE
|
#define CONFIG_BOOTSTAGE
|
||||||
#define CONFIG_BOOTSTAGE_REPORT
|
#define CONFIG_BOOTSTAGE_REPORT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user