[flashrom] [PATCH] Clean up delay loop calibration

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Mar 27 17:17:08 CET 2010


On 27.03.2010 14:35, Maciej Pijanka wrote:
> On Wed, 24 Mar 2010, Carl-Daniel Hailfinger wrote:
>   
>> This cleanup is part 1/2 to make flashrom work with clang and unbreak
>> the delay calculation.
>> If the new style code is OK, I'll submit part 2/2 which makes heavy use
>> of the new style code to get timing accuracy of +-10% even in case of
>> CPU speed variations. Considering that the current code relies on the
>> dumbness of the optimizer in the C compiler and still manages to make
>> all delays twice as long as intended, I hope we can get the fixed code
>> in before 0.9.2.
>>     
>
> Imo looks fine, 
> on one machine and nic3com i get
> Calibrating delay loop... 95M loops per second, 10 myus = 23 us, 100 myus = 202 us, 1000 myus = 2042 us, 10000 myus = 20020 us, OK.
> same machine but mainboard interface (internal)
> Calibrating delay loop... 94M loops per second, 10 myus = 23 us, 100 myus = 199 us, 1000 myus = 1972 us, 10000 myus = 19784 us, OK.
>
> still bit far from 10uS = 10myus
>   

Indeed. That's a code bug I'll deal with in the next patch.

> anyway i think it won't break anything
>
> Acked-by: Maciej Pijanka <maciej.pijanka at gmail.com>
>   

Thanks, committed in r986.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list