[PATCH v4 2/8] timer: Add helper for drivers using timebase fallback

Sean Anderson seanga2 at gmail.com
Thu Sep 10 17:13:57 CEST 2020


On 9/10/20 9:38 AM, Simon Glass wrote:
> On Wed, 9 Sep 2020 at 14:09, Sean Anderson <seanga2 at gmail.com> wrote:
>>
>> 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 at gmail.com>
>> ---
>>
>> Changes in v4:
>> - New
>>
>>  drivers/timer/timer-uclass.c | 25 +++++++++++++++++++++++++
>>  include/timer.h              | 15 +++++++++++++++
>>  2 files changed, 40 insertions(+)
>>
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> Can this be tested with sandbox?
> 

Probably. I can add a test in the next revision.

--Sean


More information about the U-Boot mailing list