[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units
From: |
Ian Campbell |
Subject: |
[PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units |
Date: |
Sun, 15 Dec 2013 15:23:34 +0000 |
From: Ian Campbell <address@hidden>
u-boot's API_GET_TIMER returns the current time in ms by directly exposing the
internal get_timer which is in ms, which isn't all that clearly documented but
is obvious from the use within u-boot and is mentioned in
http://www.denx.de/wiki/U-Boot/TaskTimerAPI.
This was put wrong in 4e13e84e56f7 "Fix timer units".
Without this it takes 5000s to count down to the automatic boot of the selected
option (or I assume it would, I never waited...)
Cc: Vladimir 'phcoder' Serbinenko <address@hidden>
Cc: Leif Lindholm <address@hidden>
---
grub-core/kern/uboot/init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c
index b108de3..2e9d382 100644
--- a/grub-core/kern/uboot/init.c
+++ b/grub-core/kern/uboot/init.c
@@ -66,8 +66,7 @@ uboot_timer_ms (void)
if (cur < last)
high++;
last = cur;
- return grub_divmod64 ((((grub_uint64_t) high) << 32) | cur,
- 1000, 0);
+ return (((grub_uint64_t) high) << 32) | cur;
}
void
--
1.7.10.4
- [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units,
Ian Campbell <=