aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/config_fallbacks.h4
-rw-r--r--lib/time.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 81cbad44320..46dfccb82e0 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -57,4 +57,8 @@
#define CONFIG_SYS_PROMPT "=> "
#endif
+#ifndef CONFIG_SYS_HZ
+#define CONFIG_SYS_HZ 1000
+#endif
+
#endif /* __CONFIG_FALLBACKS_H */
diff --git a/lib/time.c b/lib/time.c
index 68b8ff41907..6514835df78 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -8,6 +8,10 @@
#include <common.h>
#include <watchdog.h>
+#if CONFIG_SYS_HZ != 1000
+#warning "CONFIG_SYS_HZ must be 1000 and should not be defined by platforms"
+#endif
+
#ifndef CONFIG_WD_PERIOD
# define CONFIG_WD_PERIOD (10 * 1000 * 1000) /* 10 seconds default*/
#endif