]> git.baikalelectronics.ru Git - uboot.git/commit
timer: Add helper for drivers using timebase fallback
authorSean Anderson <seanga2@gmail.com>
Mon, 28 Sep 2020 14:52:22 +0000 (10:52 -0400)
committerAndes <uboot@andestech.com>
Wed, 30 Sep 2020 00:54:45 +0000 (08:54 +0800)
commiteabc93693fc9a3b92365ead0f2800c155b7c83cb
tree7c9b33bba348375cd647da2f7f03891b34b9622e
parent3a99b86998b6d8d6ca4d9c05a13d203c8303f86b
timer: Add helper for drivers using timebase fallback

This function is designed to be used when a timer used to be initialized by
the cpu (e.g. RISC-V timers), but now is initialized by dm_timer_init. In
such a case, the timer may prefer to use the clocks and clock-frequency
properties, but should be able to fall back on using the cpu's
timebase-frequency.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
drivers/timer/timer-uclass.c
include/timer.h