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>
This commit is contained in:
Martin Roth 2017-12-11 13:27:56 -07:00
parent 8976e0dbe9
commit ac9d6b8c73
1 changed files with 5 additions and 5 deletions

View File

@ -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)