mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Reinitialize the delay loop upon recalibration
Fix an unescaped % in a format specifier. Corresponding to flashrom svn r992. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
parent
ad0010a67a
commit
f640401e92
3
udelay.c
3
udelay.c
@ -66,6 +66,7 @@ void myusec_calibrate_delay(void)
|
|||||||
printf("Calibrating delay loop... ");
|
printf("Calibrating delay loop... ");
|
||||||
|
|
||||||
recalibrate:
|
recalibrate:
|
||||||
|
count = 1000;
|
||||||
while (1) {
|
while (1) {
|
||||||
timeusec = measure_delay(count);
|
timeusec = measure_delay(count);
|
||||||
if (timeusec > 1000000 / 4)
|
if (timeusec > 1000000 / 4)
|
||||||
@ -93,7 +94,7 @@ recalibrate:
|
|||||||
*/
|
*/
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (measure_delay(100) < 90) {
|
if (measure_delay(100) < 90) {
|
||||||
msg_pdbg("delay more than 10% too short, "
|
msg_pdbg("delay more than 10%% too short, "
|
||||||
"recalculating... ");
|
"recalculating... ");
|
||||||
goto recalibrate;
|
goto recalibrate;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user