test: move timer mocks to the common part

Previously used by kpb tests only and defined locally.
New pieces of the code, like perf macros need them
globally.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This commit is contained in:
Marcin Maka 2020-03-19 14:06:38 +01:00 committed by Janusz Jankowski
parent 2978741118
commit 8d350a3eff
1 changed files with 16 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include <errno.h>
#include <sof/lib/alloc.h>
#include <sof/drivers/timer.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h>
@ -85,3 +86,18 @@ void WEAK _spin_unlock_irq(spinlock_t *lock, uint32_t flags, int line)
(void)flags;
(void)line;
}
uint64_t WEAK platform_timer_get(struct timer *timer)
{
(void)timer;
return 0;
}
uint64_t WEAK arch_timer_get_system(struct timer *timer)
{
(void)timer;
return 0;
}