diff options
author | Tom Rini <trini@konsulko.com> | 2015-05-08 10:46:59 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-08 10:46:59 -0400 |
commit | 02ffb580e6ab7aaa7f6703ed35f489e97439cb65 (patch) | |
tree | 77cea28c53d54583a3acfa5534a8aa10054eb29c /board | |
parent | 57cc4e64c13bc5f42cb5e8572d2c46e25cf7aea1 (diff) | |
parent | a5e1bcdeebebabdc5d013fbd488f87a4e62ff411 (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'board')
-rw-r--r-- | board/sandbox/sandbox.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 2227f1c1214..80eaa6334cb 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -7,6 +7,7 @@ #include <cros_ec.h> #include <dm.h> #include <os.h> +#include <asm/test.h> #include <asm/u-boot-sandbox.h> /* @@ -25,9 +26,17 @@ void flush_cache(unsigned long start, unsigned long size) { } +/* 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) |