From ddd6ca78a1ec57d8549393124a3e5fbad0cdf362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Fri, 1 Nov 2019 18:25:46 +0200 Subject: intel/quark: Switch to TSC_MONOTONIC_TIMER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5ea899863c5b9ed516a55ba2e7524dd33a6f651d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/36554 Reviewed-by: Angel Pons Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/quark/Kconfig | 1 + src/soc/intel/quark/tsc_freq.c | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'src/soc/intel/quark') diff --git a/src/soc/intel/quark/Kconfig b/src/soc/intel/quark/Kconfig index 75f13543ca..461d230371 100644 --- a/src/soc/intel/quark/Kconfig +++ b/src/soc/intel/quark/Kconfig @@ -36,6 +36,7 @@ config CPU_SPECIFIC_OPTIONS select SPI_FLASH select UART_OVERRIDE_REFCLK select UDELAY_TSC + select TSC_MONOTONIC_TIMER select UNCOMPRESSED_RAMSTAGE select USE_MARCH_586 select NO_SMM diff --git a/src/soc/intel/quark/tsc_freq.c b/src/soc/intel/quark/tsc_freq.c index e6d0369eff..fa5bd67efe 100644 --- a/src/soc/intel/quark/tsc_freq.c +++ b/src/soc/intel/quark/tsc_freq.c @@ -14,21 +14,10 @@ * GNU General Public License for more details. */ -#include -#include #include -#include unsigned long tsc_freq_mhz(void) { /* CPU freq = 400 MHz */ return 400; } - -void timer_monotonic_get(struct mono_time *mt) -{ - uint64_t tsc_value; - - tsc_value = rdtscll(); - mt->microseconds = tsc_value / tsc_freq_mhz(); -} -- cgit v1.2.3