[U-Boot] DM: uclass for timer

Simon Glass sjg at chromium.org
Thu Sep 10 04:45:57 CEST 2015


Hi Thomas,

On 8 September 2015 at 05:35, Thomas Chou <thomas at wytron.com.tw> wrote:
> Hi Simon,
>
> Shall we have a timer class in driver model?
>
> I am trying to get the base address and clock rate of timer from device
> tree, and use them for timer_init() in common/board_f.c and lib/time.c .
>
> As almost every board needs a timer, I wonder if it makes sense to use
> driver model? Or shall I use fdtdec to do the binding?
>
> timer_init() sits after initf_dm() in common/board_f.c will this work?

Yes I guess so. We will need it sooner or later. You could add a
microsecond API also.

Regards,
Simon


More information about the U-Boot mailing list