[U-Boot] [PATCH] Fix bootdelay timeout calculation when SYS_HZ!=1000
Stephen Warren
swarren at wwwdotorg.org
Thu Mar 21 06:14:34 CET 2013
Commit b2f3e0e "console: USB: KBD: Fix incorrect autoboot timeout"
re-wrote the bootdelay timeout loop. However, it hard-coded the value
that get_delay() was expected to increment in one second, rather than
calculating it based on CONFIG_SYS_HZ. On systems where SYS_HZ != 1000,
this caused bootdelay timeout to be incorrect. Fix this.
Cc: Jim Lin <jilin at nvidia.com>
Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
---
common/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/main.c b/common/main.c
index a15f020..4f81ca9 100644
--- a/common/main.c
+++ b/common/main.c
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
break;
}
udelay(10000);
- } while (!abort && get_timer(ts) < 1000);
+ } while (!abort && get_timer(ts) < CONFIG_SYS_HZ);
printf("\b\b\b%2d ", bootdelay);
}
--
1.7.10.4
More information about the U-Boot
mailing list