#include <cros_ec.h>
#include <dm.h>
#include <os.h>
+#include <asm/test.h>
#include <asm/u-boot-sandbox.h>
/*
{
}
+/* system timer offset in ms */
+static unsigned long sandbox_timer_offset;
+
+void sandbox_timer_add_offset(unsigned long offset)
+{
+ sandbox_timer_offset += offset;
+}
+
unsigned long timer_read_counter(void)
{
- return os_get_nsec() / 1000;
+ return os_get_nsec() / 1000 + sandbox_timer_offset * 1000;
}
int dram_init(void)