mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: libpayload: Get current tick from high register in generic timer
This fixes the generic timer driver to get the current tick from the high register, so that comparison with the high count value (obtained previously from the same register) has a chance to succeed. BUG=none BRANCH=none TEST=none Change-Id: I5ce02bfa15a91ad34641b8e24813a5b7ca790ec3 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/17929 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: https://chromium-review.googlesource.com/427823 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
This commit is contained in:
parent
5846d248fb
commit
11ddfce5d8
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ uint64_t timer_raw_value(void)
|
|||
do {
|
||||
count_h = readl(phys_to_virt(CONFIG_LP_TIMER_GENERIC_HIGH_REG));
|
||||
count_l = readl(phys_to_virt(CONFIG_LP_TIMER_GENERIC_REG));
|
||||
cur_tick = readl(phys_to_virt(CONFIG_LP_TIMER_GENERIC_REG));
|
||||
cur_tick = readl(phys_to_virt(CONFIG_LP_TIMER_GENERIC_HIGH_REG));
|
||||
} while (cur_tick != count_h);
|
||||
|
||||
return (cur_tick << 32) + count_l;
|
||||
|
|
Loading…
Add table
Reference in a new issue