diff options
author | Martin Roth <martinroth@google.com> | 2017-12-11 13:27:56 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-12-12 22:27:05 +0000 |
commit | ac9d6b8c739939c45400a55c60f2104ba4eb5e5a (patch) | |
tree | 3cfc446c0506e79c515c7b6f22205f02dab74ae0 /util/cbmem | |
parent | 8976e0dbe979e74e03473577bfc062ad522d1b5a (diff) |
util/cbmem: Print timestamp frequency in verbose mode
The code flow is changed slightly to print the timestamp frequency from
either method of determining it.
BUG=b:70432544
TEST=Build and test cbmem -t -V
Change-Id: I02286fa67919e70a3592cdbcc1c9ca2991b7f385
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22821
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/cbmem')
-rw-r--r-- | util/cbmem/cbmem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index dea2c0b11e..09957baf24 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -501,16 +501,16 @@ static void timestamp_set_tick_freq(unsigned long table_tick_freq_mhz) { tick_freq_mhz = table_tick_freq_mhz; - /* Honor table frequency. */ - if (tick_freq_mhz) - return; - - tick_freq_mhz = arch_tick_frequency(); + /* Honor table frequency if present. */ + if (!tick_freq_mhz) + tick_freq_mhz = arch_tick_frequency(); if (!tick_freq_mhz) { fprintf(stderr, "Cannot determine timestamp tick frequency.\n"); exit(1); } + + debug("Timestamp tick frequency: %ld MHz\n", tick_freq_mhz); } u64 arch_convert_raw_ts_entry(u64 ts) |