diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-12-12 06:12:27 -0800 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2018-12-18 09:56:26 +0800 |
commit | 60262cd041529cabd5fbabb6f2077495fa922fca (patch) | |
tree | 85e5cbb9425db511409952a9cf556febcc3e14cb /drivers/timer/Kconfig | |
parent | 833508c05c1309624cd397dbea2714b723d58c35 (diff) |
timer: Add generic driver for RISC-V privileged architecture defined timer
RISC-V privileged architecture v1.10 defines a real-time counter,
exposed as a memory-mapped machine-mode register - mtime. mtime must
run at constant frequency, and the platform must provide a mechanism
for determining the timebase of mtime. The mtime register has a
64-bit precision on all RV32, RV64, and RV128 systems.
Different platform may have different implementation of the mtime
block hence an API riscv_get_time() is required by this driver for
platform codes to hide such implementation details. For example,
on some platforms mtime is provided by the CLINT module, while on
some other platforms a simple 'rdtime' can be used to get the timer
counter.
With this timer driver the U-Boot timer functionalities like delay
works correctly now.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'drivers/timer/Kconfig')
-rw-r--r-- | drivers/timer/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index b0e6f32f0b..df37a798bd 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -126,6 +126,13 @@ config OMAP_TIMER help Select this to enable an timer for Omap devices. +config RISCV_TIMER + bool "RISC-V timer support" + depends on TIMER && RISCV + help + Select this to enable support for the timer as defined + by the RISC-V privileged architecture spec. + config ROCKCHIP_TIMER bool "Rockchip timer support" depends on TIMER |