summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-10-24 01:30:40 +0900
committerTom Rini <trini@ti.com>2014-10-23 13:18:59 -0400
commit8c688bc4de4856f20193e6f0bc92e7273e8cf7ad (patch)
tree37d0383a340b19b3b4f290857e65af51212bb067 /lib
parentb2b8a6967a0579fd5cace0280d9cf0b54d3bbf1f (diff)
downloadblackbird-obmc-uboot-8c688bc4de4856f20193e6f0bc92e7273e8cf7ad.tar.gz
blackbird-obmc-uboot-8c688bc4de4856f20193e6f0bc92e7273e8cf7ad.zip
kconfig: move CONFIG_SYS_HZ to lib/Kconfig
CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h (but some boards still have redundant definitions). This commit moves the definition and the document in README to Kconfig. Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000, the sanity check in lib/time.c should be removed. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig8
-rw-r--r--lib/time.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 88e5da72ec..a889c229cb 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -8,4 +8,12 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
If unsure, say N.
+config SYS_HZ
+ int
+ default 1000
+ help
+ The frequency of the timer returned by get_timer().
+ get_timer() must operate in milliseconds and this option must be
+ set to 1000.
+
endmenu
diff --git a/lib/time.c b/lib/time.c
index c7b026498b..5ebd1be48f 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -10,10 +10,6 @@
#include <div64.h>
#include <asm/io.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
OpenPOWER on IntegriCloud