The sleep command only provides correct timings for
CONFIG_SYS_HZ=2000 on qemu-x86_defconfig.

This can be tested with

    date && sleep 4 && date

Make CONFIG_SYS_HZ editable.
Set it in qemu-x86_defconfig to 2000.

Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
 configs/qemu-x86_defconfig | 1 +
 lib/Kconfig                | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index 12ea72f562..8fc725dcc4 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -51,3 +51,4 @@ CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
 CONFIG_FRAMEBUFFER_VESA_MODE_USER=y
 CONFIG_FRAMEBUFFER_VESA_MODE=0x144
 CONFIG_CONSOLE_SCROLL_LINES=5
+CONFIG_SYS_HZ=2000
diff --git a/lib/Kconfig b/lib/Kconfig
index 622f3c26c3..f37db20593 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -82,12 +82,10 @@ config USE_PRIVATE_LIBGCC
          If unsure, say N.
 
 config SYS_HZ
-       int
+       int "Frequency of the timer"
        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.
 
 config USE_TINY_PRINTF
        bool "Enable tiny printf() version"
-- 
2.18.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to