Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/spinlock.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <asm/fsl_gtm.h>
Go to the source code of this file.
Data Structures | |
struct | gtm_timers_regs |
struct | gtm |
Macros | |
#define | GTCFR_STP(x) ((x) & 1 ? 1 << 5 : 1 << 1) |
#define | GTCFR_RST(x) ((x) & 1 ? 1 << 4 : 1 << 0) |
#define | GTMDR_ICLK_MASK (3 << 1) |
#define | GTMDR_ICLK_ICAS (0 << 1) |
#define | GTMDR_ICLK_ICLK (1 << 1) |
#define | GTMDR_ICLK_SLGO (2 << 1) |
#define | GTMDR_FRR (1 << 3) |
#define | GTMDR_ORI (1 << 4) |
#define | GTMDR_SPS(x) ((x) << 8) |
Functions | |
struct gtm_timers_regs | __attribute__ ((packed)) |
struct gtm_timer * | gtm_get_timer16 (void) |
EXPORT_SYMBOL (gtm_get_timer16) | |
struct gtm_timer * | gtm_get_specific_timer16 (struct gtm *gtm, unsigned int timer) |
EXPORT_SYMBOL (gtm_get_specific_timer16) | |
void | gtm_put_timer16 (struct gtm_timer *tmr) |
EXPORT_SYMBOL (gtm_put_timer16) | |
int | gtm_set_timer16 (struct gtm_timer *tmr, unsigned long usec, bool reload) |
EXPORT_SYMBOL (gtm_set_timer16) | |
int | gtm_set_exact_timer16 (struct gtm_timer *tmr, u16 usec, bool reload) |
EXPORT_SYMBOL (gtm_set_exact_timer16) | |
void | gtm_stop_timer16 (struct gtm_timer *tmr) |
EXPORT_SYMBOL (gtm_stop_timer16) | |
void | gtm_ack_timer16 (struct gtm_timer *tmr, u16 events) |
EXPORT_SYMBOL (gtm_ack_timer16) | |
arch_initcall (fsl_gtm_init) | |
Variables | |
u8 | gtcfr1 |
u8 | res0 [0x3] |
u8 | gtcfr2 |
u8 | res1 [0xB] |
__be16 | gtmdr1 |
__be16 | gtmdr2 |
__be16 | gtrfr1 |
__be16 | gtrfr2 |
__be16 | gtcpr1 |
__be16 | gtcpr2 |
__be16 | gtcnr1 |
__be16 | gtcnr2 |
__be16 | gtmdr3 |
__be16 | gtmdr4 |
__be16 | gtrfr3 |
__be16 | gtrfr4 |
__be16 | gtcpr3 |
__be16 | gtcpr4 |
__be16 | gtcnr3 |
__be16 | gtcnr4 |
__be16 | gtevr1 |
__be16 | gtevr2 |
__be16 | gtevr3 |
__be16 | gtevr4 |
__be16 | gtpsr1 |
__be16 | gtpsr2 |
__be16 | gtpsr3 |
__be16 | gtpsr4 |
u8 | res2 [0x40] |
struct gtm | __attribute__ |
|
read |
Definition at line 171 of file esd_usb2.c.
arch_initcall | ( | fsl_gtm_init | ) |
EXPORT_SYMBOL | ( | gtm_get_timer16 | ) |
EXPORT_SYMBOL | ( | gtm_get_specific_timer16 | ) |
EXPORT_SYMBOL | ( | gtm_put_timer16 | ) |
EXPORT_SYMBOL | ( | gtm_set_timer16 | ) |
EXPORT_SYMBOL | ( | gtm_set_exact_timer16 | ) |
EXPORT_SYMBOL | ( | gtm_stop_timer16 | ) |
EXPORT_SYMBOL | ( | gtm_ack_timer16 | ) |
gtm_get_specific_timer - request specific GTM timer : specific GTM, pass here GTM's device_node->data : specific timer number, Timer1 is 0. Context: non-IRQ
This function reserves GTM timer for later use. It returns gtm_timer structure to use with the rest of GTM API, you should use timer->irq to manage timer interrupt.
gtm_set_exact_utimer16 - (re)set 16 bits timer : pointer to the gtm_timer structure obtained from gtm_get_timer : timer interval in microseconds : if set, the timer will reset upon expiry rather than continue running free. Context: any
This function (re)sets GTM timer so that it counts up to the requested interval value, and fires the interrupt when the value is reached. If reload flag was set, timer will also reset itself upon reference value, otherwise it continues to increment.
The exact bit in the function name states that this function will not crop precision of the "usec" argument, thus usec is limited to 16 bits (single timer width).
gtm_set_timer16 - (re)set 16 bit timer with arbitrary precision : pointer to the gtm_timer structure obtained from gtm_get_timer : timer interval in microseconds : if set, the timer will reset upon expiry rather than continue running free. Context: any
This function (re)sets the GTM timer so that it counts up to the requested interval value, and fires the interrupt when the value is reached. This function will reduce the precision of the timer as needed in order for the requested timeout to fit in a 16-bit register.