coreboot/payloads/libpayload/libc
Vadim Bendebury e1abf87d43 libpayload: improve us timer accuracy
In cases where timer clock frequency is not an integer number of
megahertz, the calculations in timer_us() lack accuracy.

This patch modifies calculations to reduce the error. The maximum
interval this calculation would support decreases, but it still is in
excess of 1844674 seconds for a timer clocked by 10 MHz, which is more
than enough.

BUG=none
TEST=manual
  . verified timer accuracy using a depthcharge CLI command

Change-Id: Iffb323db10e74b0ce3b4d59a56983bfee12e6805
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/207358
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-07-11 01:55:41 +00:00
..
args.c
console.c libpayload: Add ability to unregister output driver 2014-06-11 03:30:51 +00:00
ctype.c
die.c libpayload: Fix the license in some files which were accidentally made GPL. 2014-01-11 01:36:57 +00:00
exec.c libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig. 2013-08-14 17:05:33 -07:00
getopt_long.c
hexdump.c libpayload: Fix the license header on hexdump. 2014-01-15 23:36:36 +00:00
ipchecksum.c
lar.c
lib.c
Makefile.inc libpayload: Add a new "die" function to fatally signal programming errors. 2013-11-27 01:46:00 +00:00
malloc.c libpayload: Fix pointer related casts 2014-05-14 00:25:48 +00:00
memory.c libpayload: Reorder default memcpy, speed up memset and memcmp 2014-06-23 19:31:18 +00:00
printf.c libpayload: console: Allow output drivers to print whole strings at once 2014-04-30 10:00:35 +00:00
qsort.c
rand.c
readline.c
string.c
strings.c
strlcpy.c
sysinfo.c
time.c libpayload: improve us timer accuracy 2014-07-11 01:55:41 +00:00