dm: timer: Support 64-bit counter
There are timers with a 64-bit counter value but current timer uclass driver assumes a 32-bit one. Modify timer_get_count() to ask timer driver to always return a 64-bit counter value, and provide an inline helper function timer_conv_64() to handle the 32-bit/64-bit conversion automatically. Signed-off-by:Bin Meng <bmeng.cn@gmail.com> Acked-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
Showing
- drivers/timer/altera_timer.c 2 additions, 2 deletionsdrivers/timer/altera_timer.c
- drivers/timer/sandbox_timer.c 1 addition, 1 deletiondrivers/timer/sandbox_timer.c
- drivers/timer/timer-uclass.c 12 additions, 3 deletionsdrivers/timer/timer-uclass.c
- include/timer.h 11 additions, 3 deletionsinclude/timer.h
- lib/time.c 6 additions, 3 deletionslib/time.c
Loading
Please register or sign in to comment