[U-Boot] [PATCH v2 1/2] dm: implement a Timer uclass

Thomas Chou thomas at wytron.com.tw
Thu Oct 1 09:22:08 CEST 2015


Hi Simon,

On 09/29/2015 09:57 PM, Simon Glass wrote:
>> +int timer_get_count(struct udevice *dev, unsigned long *count);
>
> We should also handle microsecond time in this API. How about:
>
> timer_get_ms()
> timer_get_us()

Please allow the additional API be implemented at some later point. It 
might be better to keep the first patch simple as possible,

>> +       /*
>> +        * Get the timer clock rate
>> +        *
>> +        * @dev:        The Timer device
>> +        * @rate:       pointer that returns the timer clock rate
>> +        */
>> +       int (*get_rate)(struct udevice *dev, unsigned long *rate);
>
> in Hz. Also, isn't the clock rate required to be 1000 now?

Sorry for the confusion. It meant the timer input clock frequency. I 
rename it to get_clock() now. Will this be better?

Thanks a lot for your review.

Best regards,
Thomas Chou


More information about the U-Boot mailing list