]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/sandbox/sandbox.c
karo: tx28: set CONFIG_ENV_OVERWRITE also for NAND environment
[karo-tx-uboot.git] / board / sandbox / sandbox.c
index e4d4e021bcd9ff0fb26cc6121a4c103ace7f1c5b..80eaa6334cb56cccbeadaee9e0a3bf68c9a07c40 100644 (file)
@@ -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)
@@ -53,18 +62,6 @@ int board_early_init_f(void)
 }
 #endif
 
-int arch_early_init_r(void)
-{
-#ifdef CONFIG_CROS_EC
-       if (cros_ec_board_init()) {
-               printf("%s: Failed to init EC\n", __func__);
-               return 0;
-       }
-#endif
-
-       return 0;
-}
-
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {