]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
kconfig: move CONFIG_SYS_HZ to lib/Kconfig
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 23 Oct 2014 16:30:40 +0000 (01:30 +0900)
committerTom Rini <trini@ti.com>
Thu, 23 Oct 2014 17:18:59 +0000 (13:18 -0400)
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>
12 files changed:
README
include/config_fallbacks.h
include/configs/cm_fx6.h
include/configs/edb93xx.h
include/configs/ks2_evm.h
include/configs/ls1021aqds.h
include/configs/ls1021atwr.h
include/configs/ls2085a_common.h
include/configs/sunxi-common.h
include/configs/tqma6.h
lib/Kconfig
lib/time.c

diff --git a/README b/README
index 4dbf2d4050e2df9fa9fe9472fbe6d238cc3b67a0..3ff793266b87523c4fd22237760aadeef918a30c 100644 (file)
--- a/README
+++ b/README
@@ -623,13 +623,6 @@ The following options need to be configured:
                exists, unlike the similar options in the Linux kernel. Do not
                set these options unless they apply!
 
-- CPU timer options:
-               CONFIG_SYS_HZ
-
-               The frequency of the timer returned by get_timer().
-               get_timer() must operate in milliseconds and this CONFIG
-               option must be set to 1000.
-
 - Linux Kernel Interface:
                CONFIG_CLOCKS_IN_MHZ
 
index 76818f673f2810c69520067a7a10e2b34ed4515a..7d8daa2b8e5332f421b9bb616812d494927f1c71 100644 (file)
 #define CONFIG_SYS_PROMPT      "=> "
 #endif
 
-#ifndef CONFIG_SYS_HZ
-#define CONFIG_SYS_HZ          1000
-#endif
-
 #ifndef CONFIG_FIT_SIGNATURE
 #define CONFIG_IMAGE_FORMAT_LEGACY
 #endif
index a20c3733212ca39d2dc9509a63b703746aad5c0a..f7277eb1d17a0d5f3a4c613d6033bd682c3491dd 100644 (file)
@@ -19,7 +19,6 @@
 #define CONFIG_MX6
 #define CONFIG_SYS_LITTLE_ENDIAN
 #define CONFIG_MACH_TYPE               4273
-#define CONFIG_SYS_HZ                  1000
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_DM
index 37bdcc0f3320a447b096ec9c553cad579929e1ca..47a8420f42d37cf8a9d9d4614a25b255254e1c82 100644 (file)
@@ -89,7 +89,6 @@
 #define CONFIG_EP93XX          1               /* in a Cirrus Logic 93xx SoC */
 
 #define CONFIG_SYS_CLK_FREQ    14745600        /* EP93xx has a 14.7456 clock */
-#define CONFIG_SYS_HZ          1000            /* decr freq: 1 ms ticks */
 #undef CONFIG_USE_IRQ                          /* Don't need IRQ/FIQ */
 
 /* Monitor configuration */
index 51926f721f17e6305d408dfe2e08d1816e97a5cd..137d9b0d32f2793ba8c2571ef32ff39d240f8345 100644 (file)
@@ -23,7 +23,6 @@
 #define CONFIG_ARMV7
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_SYS_ARCH_TIMER
-#define CONFIG_SYS_HZ                  1000
 #define CONFIG_SYS_TEXT_BASE           0x0c001000
 #define CONFIG_SPL_TARGET              "u-boot-spi.gph"
 #define CONFIG_SYS_DCACHE_OFF
index 42214262f480fd5ad748a360c2177ce139f8fe9b..d1f6ea7e7b0e6d5f1efcda54eca34af3cd3d3b3c 100644 (file)
@@ -360,7 +360,6 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_MEMTEST_END         0x9fffffff
 
 #define CONFIG_SYS_LOAD_ADDR           0x82000000
-#define CONFIG_SYS_HZ                  1000
 
 /*
  * Stack sizes
index 5868287057399b8c830adfe03124a090493d34d7..3c73af8ac39dc6663fa0db3ed5d91eb9c3601618 100644 (file)
 #define CONFIG_SYS_MEMTEST_END         0x9fffffff
 
 #define CONFIG_SYS_LOAD_ADDR           0x82000000
-#define CONFIG_SYS_HZ                  1000
 
 /*
  * Stack sizes
index a72e1f3567d22144383bf94b306bfb0c5f1112cb..6fe032c9ff64fb6b89f107095af3b9f38ca4998b 100644 (file)
 
 #define CONFIG_NR_DRAM_BANKS           3
 
-#define CONFIG_SYS_HZ                  1000
-
 #define CONFIG_HWCONFIG
 #define HWCONFIG_BUFFER_SIZE           128
 
index 1d947d7d9eab39030964f4d6b1e14e678303e55e..0c117bc5e7a8b64e7711ba4758cb16030d7637e8 100644 (file)
 /* standalone support */
 #define CONFIG_STANDALONE_LOAD_ADDR    0x42000000
 
-#define CONFIG_SYS_HZ                  1000
-
 /* baudrate */
 #define CONFIG_BAUDRATE                        115200
 
index 2705d2c55febe2b7d7f9b1881ae63af37a8a85ba..d97a9613ae5f3c83f56f246467a51ba1ea767f83 100644 (file)
 #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
 
 #define CONFIG_SYS_LOAD_ADDR           CONFIG_LOADADDR
-#define CONFIG_SYS_HZ                  1000
 
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_STACKSIZE               (128u * SZ_1K)
index 88e5da72ecc6ffe619a337b981dcb6c6af206c9a..a889c229cb52f3e003afc506df418751019ba454 100644 (file)
@@ -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
index c7b026498be67e28f02cf070acf73a43e3c18ad4..5ebd1be48f324f8e9f21157ddd1b38f2dc85570a 100644 (file)
 #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