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>
This commit is contained in:
parent
5b15e01035
commit
ddd6ca78a1
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue