summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-01 18:25:46 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-03 06:16:24 +0000
commitddd6ca78a1ec57d8549393124a3e5fbad0cdf362 (patch)
tree97598b9dbba6035081c41ed9e02ad921f8bef1cc /src/soc
parent5b15e0103536101a4e0ebd398df9a0edbb3a9648 (diff)
intel/quark: Switch to TSC_MONOTONIC_TIMER
Change-Id: I5ea899863c5b9ed516a55ba2e7524dd33a6f651d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36554 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/quark/Kconfig1
-rw-r--r--src/soc/intel/quark/tsc_freq.c11
2 files changed, 1 insertions, 11 deletions
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 <stdint.h>
-#include <cpu/x86/msr.h>
#include <cpu/x86/tsc.h>
-#include <timer.h>
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();
-}