diff options
author | Pragnesh Patel <pragnesh.patel@sifive.com> | 2021-01-17 18:11:25 +0530 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2021-01-18 11:06:32 +0800 |
commit | bc8d12bfd8750de265b742f2ab9cdde2726ea85f (patch) | |
tree | 2bbdf6fd3df17150cba305c93de6c906043d8dea /include | |
parent | a80f85138c9457141c799c022b5c924252031512 (diff) |
riscv: timer: Add support for an early timer
Added support for timer_early_get_count() and timer_early_get_rate()
This is mostly useful in tracing.
Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/ax25-ae350.h | 5 | ||||
-rw-r--r-- | include/configs/qemu-riscv.h | 5 | ||||
-rw-r--r-- | include/configs/sifive-fu540.h | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/configs/ax25-ae350.h b/include/configs/ax25-ae350.h index b2606e794dd..bd9c371f835 100644 --- a/include/configs/ax25-ae350.h +++ b/include/configs/ax25-ae350.h @@ -17,6 +17,11 @@ #endif #endif +#define RISCV_MMODE_TIMERBASE 0xe6000000 +#define RISCV_MMODE_TIMER_FREQ 60000000 + +#define RISCV_SMODE_TIMER_FREQ 60000000 + /* * CPU and Board Configuration Options */ diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h index a2f33587c24..5291de83f8d 100644 --- a/include/configs/qemu-riscv.h +++ b/include/configs/qemu-riscv.h @@ -29,6 +29,11 @@ #define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 +#define RISCV_MMODE_TIMERBASE 0x2000000 +#define RISCV_MMODE_TIMER_FREQ 1000000 + +#define RISCV_SMODE_TIMER_FREQ 1000000 + /* Environment options */ #ifndef CONFIG_SPL_BUILD diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h index c1c79db1474..0d69d1c5482 100644 --- a/include/configs/sifive-fu540.h +++ b/include/configs/sifive-fu540.h @@ -36,6 +36,11 @@ #define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 +#define RISCV_MMODE_TIMERBASE 0x2000000 +#define RISCV_MMODE_TIMER_FREQ 1000000 + +#define RISCV_SMODE_TIMER_FREQ 1000000 + /* Environment options */ #ifndef CONFIG_SPL_BUILD |