Merge branch 'master' of git://git.denx.de/u-boot-samsung
[platform/kernel/u-boot.git] / arch / sandbox / cpu / cpu.c
index 2def722..eefed2e 100644 (file)
@@ -4,6 +4,7 @@
  */
 #define DEBUG
 #include <common.h>
+#include <dm.h>
 #include <errno.h>
 #include <libfdt.h>
 #include <os.h>
@@ -138,3 +139,14 @@ done:
 
        return 0;
 }
+
+ulong timer_get_boot_us(void)
+{
+       static uint64_t base_count;
+       uint64_t count = os_get_nsec();
+
+       if (!base_count)
+               base_count = count;
+
+       return (count - base_count) / 1000;
+}