![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <timer.h>
#include <delay.h>
#include <device/mmio.h>
#include "dmtimer.h"
#include "clock.h"
Go to the source code of this file.
Macros | |
#define | CLKSEL_M_OSC (0x01 << 0) |
Functions | |
static uint32_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 | |
struct am335x_dmtimer * | dmtimer_2 = (struct am335x_dmtimer *)DMTIMER_2 |
Init Global System Timers Unit (GTI).
Configure timer to run at 1MHz tick-rate.
Init Global System Timers Unit (GTI).
Definition at line 24 of file timer.c.
References am335x_cm_dpll, CLKSEL_M_OSC, am335x_cm_dpll_regs::clksel_timer2_clk, dmtimer_2, am335x_dmtimer::tclr, TCLR_AR, TCLR_ST, and write32().
Get GTI counter value.
mt | Structure to fill |
Definition at line 19 of file timer.c.
References M_OSC_MHZ, mono_time_set_usecs(), and timer_raw_value().
Referenced by stopwatch_init(), and stopwatch_tick().
Definition at line 14 of file timer.c.
References dmtimer_2, read32(), and am335x_dmtimer::tcrr.
Referenced by timer_monotonic_get().
struct am335x_dmtimer* dmtimer_2 = (struct am335x_dmtimer *)DMTIMER_2 |
Definition at line 10 of file timer.c.
Referenced by init_timer(), and timer_raw_value().