diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2020-12-04 17:31:10 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-12-06 18:59:27 +0000 |
commit | 2f5c7590770f7bbb00f899a1495675083872b0d7 (patch) | |
tree | 50e46daaae55446be9dd84c8360c80b52d71d547 /src/soc/amd/picasso/monotonic_timer.c | |
parent | 0a93f7a7e99bf0872e019adeed08bf7b620a8985 (diff) |
soc/amd: factor out common family 17h&19h TSC and monotonic timer code
The corresponding MSRs of all AMD family 17h and 19h CPUs/APUs match the
code.
Change-Id: I29cfef5d8920c29e36c55fc46a90eb579a042b64
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/picasso/monotonic_timer.c')
-rw-r--r-- | src/soc/amd/picasso/monotonic_timer.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/soc/amd/picasso/monotonic_timer.c b/src/soc/amd/picasso/monotonic_timer.c deleted file mode 100644 index 941532cca6..0000000000 --- a/src/soc/amd/picasso/monotonic_timer.c +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <cpu/x86/msr.h> -#include <cpu/x86/tsc.h> -#include <timer.h> -#include <timestamp.h> - -void timer_monotonic_get(struct mono_time *mt) -{ - mono_time_set_usecs(mt, timestamp_get()); -} - -uint64_t timestamp_get(void) -{ - return rdtscll() / tsc_freq_mhz(); -} |