[U-Boot] [RFC][Timer API] Revised Specification - Implementation details

Graeme Russ graeme.russ at gmail.com
Fri May 27 10:01:20 CEST 2011


On Friday, May 27, 2011, Graeme Russ <graeme.russ at gmail.com> wrote:
> Hi Wolfgang
>
> On Friday, May 27, 2011, Wolfgang Denk <wd at denx.de> wrote:
>> Dear Graeme Russ,
>>
>> In message <4DDF543D.6020506 at gmail.com> you wrote:
>>>
>>> >> I think we will need to define get_timer() weak - Nios will have to
>>> >> override the default implementation to cater for it's (Nios') limitations
>>> >
>>> > Please don't  - isn't the purpose of this whole discussion to use
>>> > common code for this ?
>>> >
>>>
>>> Yes, but Nios is particularly bad - It has a 10ms tick counter :(
>>>
>>> I don't see reason for hamstring other platforms when a simply weak
>>> function can get around it
>>
>> Why does NIOS require a different get_timer() implementation?
>>
>> Nobody claims that get_timer() has any specific resolution. It is
>> perfectly legal that a loop like
>>
>>         for (;;) {
>>                 u32 t = get_time();
>>
>>                 printf("t=%ul\n", t);
>>         }
>>
>> returns 100 millisecond increments.
>
> Except everyone expects it to tick at something vaguely close to 1ms.
> When you comment about accuracy, I didn't expect 1000% error was
> acceptable...
>
Besides, Nios can return an increment of 10 (presumably ms) between
two immediately consecutive calls. This causes early timeouts in CFI
driver

Regards,

Graeme


More information about the U-Boot mailing list