![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Macros | |
#define | DGT_MHZ_NUM 25 |
#define | DGT_MHZ_DEN 4 |
#define | TIMER_TICKS(us) ((DGT_MHZ_NUM*(us) + (DGT_MHZ_DEN - 1)) / DGT_MHZ_DEN) |
#define | TIMER_USECS(ticks) (DGT_MHZ_DEN*(ticks) / DGT_MHZ_NUM) |
#define | DGT_CLK_DIV_1 0 |
#define | DGT_CLK_DIV_2 1 |
#define | DGT_CLK_DIV_3 2 |
#define | DGT_CLK_DIV_4 3 |
Functions | |
void | init_timer (void) |
init_timer - initialize timer More... | |
void | udelay (unsigned int usec) |
udelay - generates micro second delay. More... | |
void | timer_monotonic_get (struct mono_time *mt) |
Get GTI counter value. More... | |
#define TIMER_TICKS | ( | us | ) | ((DGT_MHZ_NUM*(us) + (DGT_MHZ_DEN - 1)) / DGT_MHZ_DEN) |
#define TIMER_USECS | ( | ticks | ) | (DGT_MHZ_DEN*(ticks) / DGT_MHZ_NUM) |
init_timer - initialize timer
Init Global System Timers Unit (GTI).
Definition at line 26 of file timer.c.
References DGT_CLEAR, DGT_CLK_CTL, DGT_CLK_DIV_4, DGT_ENABLE, DGT_ENABLE_EN, and writel_i.
Get GTI counter value.
mt | Structure to fill |
Definition at line 68 of file timer.c.
References DGT_COUNT_VAL, mono_time_set_usecs(), readl_i, and TIMER_USECS.
udelay - generates micro second delay.
usec | delay duration in microseconds |
Definition at line 47 of file timer.c.
References DGT_COUNT_VAL, readl_i, and TIMER_TICKS.