<br>I sent this accidentally only to carldani, sorry:<br><div class="gmail_quote">On Thu, Apr 8, 2010 at 23:04, Urja Rannikko <span dir="ltr"><<a href="mailto:urjaman@gmail.com">urjaman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Apr 7, 2010 at 15:19, Carl-Daniel Hailfinger <span dir="ltr"><<a href="mailto:c-d.hailfinger.devel.2006@gmx.net" target="_blank">c-d.hailfinger.devel.2006@gmx.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>On 03.04.2010 23:09, Carl-Daniel Hailfinger wrote:<br>
</div><div>> On 03.04.2010 01:28, Urja Rannikko wrote:<br>
><br>
>> This seems to "fix" this for me - the delay loop is still unreliable, but<br>
>> atleast the recalibration attempts only take 5s instead of minutes. This is<br>
>> a combined diff for both my fix and the % fix.<br>
>><br>
>> Index: udelay.c<br>
>> ===================================================================<br>
>> --- udelay.c (revision 990)<br>
>> +++ udelay.c (working copy)<br>
>> @@ -66,6 +66,7 @@<br>
>>      printf("Calibrating delay loop... ");<br>
>><br>
>>  recalibrate:<br>
>> +    count = 1000;<br>
>>      while (1) {<br>
>>              timeusec = measure_delay(count);<br>
>>              if (timeusec > 1000000 / 4)<br>
>><br>
>><br>
><br>
> Does the timing get more reliable if you try the following stuff:<br>
><br>
> - change the comparison above to<br>
><br>
> if (timeusec > 1000)<br>
><br>
<br>
</div>I expect this little change to improve precision dramatically.<br>
<div><br>
<br>
> - Make sure there are no CPU frequency changes or sleep states<br>
><br>
><br>
</div><div>>> Signed-off-by: Urja Rannikko <<a href="mailto:urjaman@gmail.com" target="_blank">urjaman@gmail.com</a>><br>
>><br>
><br>
> In general, I like your patch. I just hope to get more input if reducing<br>
> the abort condition in the loop from 250 ms to 1 ms helps as well.<br>
><br>
<br>
</div>We need your patch, I had just hoped that improved precision would be<br>
possible with the additional change I suggested. Anyway, this is<br>
Acked-by: Carl-Daniel Hailfinger <<a href="mailto:c-d.hailfinger.devel.2006@gmx.net" target="_blank">c-d.hailfinger.devel.2006@gmx.net</a>><br>
<br>
Can you commit?<br>
<div><div></div><div><br></div></div></blockquote></div></div></div>If I would have commit access ;)<br clear="all"><br>I'm sorry that i forgot about this until now (real life+work had priority) - I just changed my mb from the failing (in many ways) Asus K8S-MX to a M4N78-AM. <br>

<br>For this MB the delay loop is accurate with if (timeusec > 1000000 / 4).<br>Just for reference - M4N78-AM:<br>"timeusec < 1000" - 3 runs:<br>Calibrating delay loop... 1156M loops per second, 10 myus = 10 us, 100 myus = 101 us, 1000 myus = 1148 us, 10000 myus = 10998 us, OK.<br>

Calibrating delay loop... 1156M loops per second, 10 myus = 10 us, 100 myus = 101 us, 1000 myus = 1092 us, 10000 myus = 13070 us, OK.<br>Calibrating delay loop... 1146M loops per second, 10 myus = 10 us, 100 myus = 181 us, 1000 myus = 996 us, 10000 myus = 10807 us, OK.<br>

<br>"timeusec > 1000000 / 4" - 3 runs:<br>Calibrating delay loop... 1153M loops per second, 10 myus = 10 us, 100 myus = 100 us, 1000 myus = 998 us, 10000 myus = 10003 us, OK.<br>Calibrating delay loop... 1154M loops per second, 10 myus = 10 us, 100 myus = 100 us, 1000 myus = 1004 us, 10000 myus = 10014 us, OK.<br>

Calibrating delay loop... 1132M loops per second, 10 myus = 10 us, 100 myus = 98 us, 1000 myus = 987 us, 10000 myus = 10442 us, OK.<br><br>I dont (atleast Right Now - i dont know what I will do with that K8S-MX) want to take my new shiny system apart just to put that MB from '05 back for running flashrom a few times on it, sorry. <font color="#888888"></font><br>
</blockquote></div><br clear="all"><br>-- <br>urjaman<br>