summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/hardwaremain.c5
-rw-r--r--src/lib/timer.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index 5f06ca762a..3d1b8f2a58 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -464,8 +464,9 @@ void main(void)
/* Schedule the static boot state entries. */
boot_state_schedule_static_entries();
- /* FIXME: Is there a better way to handle this? */
- init_timer();
+ /* TODO: Understand why this is here and move to arch/platform code. */
+ if (IS_ENABLED(CONFIG_ARCH_X86))
+ init_timer();
bs_walk_state_machine();
diff --git a/src/lib/timer.c b/src/lib/timer.c
index a2edc5c96d..8aeaa063c1 100644
--- a/src/lib/timer.c
+++ b/src/lib/timer.c
@@ -22,6 +22,8 @@
#include <delay.h>
#include <thread.h>
+__attribute__((weak)) void init_timer() { /* do nothing */ }
+
void udelay(unsigned usec)
{
struct stopwatch sw;