![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/mmio.h>
#include <timer.h>
#include <delay.h>
#include <thread.h>
#include <soc/addressmap.h>
#include <soc/timer.h>
Go to the source code of this file.
Functions | |
__weak void | timer_prepare (void) |
static uint64_t | timer_raw_value (void) |
void | timer_monotonic_get (struct mono_time *mt) |
Get GTI counter value. More... | |
void | init_timer (void) |
Init Global System Timers Unit (GTI). More... | |
Variables | |
static struct mtk_gpt_regs *const | mtk_gpt = (void *)GPT_BASE |
Init Global System Timers Unit (GTI).
Configure timer to run at 1MHz tick-rate.
Definition at line 33 of file timer.c.
References clrbits32, GPT6_CLK_CLK6_SYS, GPT6_CLK_CLKDIV_DIV1, GPT6_CLOCK_REG, mtk_gpt_regs::gpt6_con, GPT6_CON_CLR, GPT6_CON_EN, GPT6_MODE_FREERUN, mtk_gpt, SET32_BITFIELDS, setbits32, and timer_prepare().
Get GTI counter value.
mt | Structure to fill |
Definition at line 28 of file timer.c.
References GPT_MHZ, mono_time_set_usecs(), and timer_raw_value().
Definition at line 13 of file timer.c.
Referenced by init_timer().
Definition at line 15 of file timer.c.
References mtk_gpt_regs::gpt6_cnt_h, mtk_gpt_regs::gpt6_cnt_l, mtk_gpt, and read32().
Referenced by timer_monotonic_get().
|
static |
Definition at line 11 of file timer.c.
Referenced by init_timer(), and timer_raw_value().