All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Fix bootdelay timeout calculation when SYS_HZ!=1000
@ 2013-03-21  5:14 Stephen Warren
  2013-03-21  6:55 ` Wolfgang Denk
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Warren @ 2013-03-21  5:14 UTC (permalink / raw)
  To: u-boot

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@nvidia.com>
Signed-off-by: Stephen Warren <swarren@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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-03-21 19:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21  5:14 [U-Boot] [PATCH] Fix bootdelay timeout calculation when SYS_HZ!=1000 Stephen Warren
2013-03-21  6:55 ` Wolfgang Denk
2013-03-21 13:50   ` Tom Rini
2013-03-21 14:35     ` Wolfgang Denk
2013-03-21 14:41       ` Tom Rini
2013-03-21 15:25         ` Jon Hunter
2013-03-21 15:28           ` Tom Rini
2013-03-21 18:07             ` Jon Hunter
2013-03-21 18:26               ` Tom Rini
2013-03-21 16:04   ` Stephen Warren
2013-03-21 19:17     ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.