coreboot/payloads
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
..
bayou GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
coreinfo GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
external bump SeaBIOS to 1.7.2.1 2013-03-04 11:00:17 +01:00
libpayload libpayload: improve us timer accuracy 2014-07-11 01:55:41 +00:00
nvramcui GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
tianocoreboot ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
ubootcli payload/ubootcli: Minimal changes to fix build errors. 2014-05-15 05:23:22 +00:00