Skip to contentSkip to conversation

DM: uclass for timer

U-Boot Thomas Chou 2 participants 3 messages Sep 8, 2015 – Sep 10, 2015

lore
Share & tools
lore
#0 lore raw

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?

Best regards,
Thomas Chou

#1 lore raw

Hi Thomas,

Quoted 11 lines · Thomas Chou

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

#2 lore raw

Hi Simon,

Quoted 2 lines · Simon Glass

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

Thanks for the help. I will try to add a timer uclass soon. I am all new to the driver model though.

Best regard,
Thomas Chou