diff options
author | Chanho Park <chanho61.park@samsung.com> | 2023-09-06 14:18:13 +0900 |
---|---|---|
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | 2023-10-04 17:55:20 +0800 |
commit | 74fbd74ed2069985c9d7dd15ffe94f8a95f1022a (patch) | |
tree | 2ecd7283cf583e45157c3ca9632ef913abb708e6 /drivers/timer/fttmr010_timer.c | |
parent | 9bcf9e49a24e1cd96565b8ccd40b23ab956c3376 (diff) |
riscv: timer: add timer_get_boot_us for BOOTSTAGE
timer_get_boot_us function is required to record the boot stages as
us-based timestamp.
To get a micro-second time from a timer tick, this converts the
formula like below to avoid zero result of (tick / rate) part.
From: time(us) = (tick / rate) * 1000000
To : time(us) = (tick * 1000) / (rate / 1000)
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'drivers/timer/fttmr010_timer.c')
0 files changed, 0 insertions, 0 deletions