Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Variables
timer.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/types.h>
#include <linux/clocksource.h>
#include <linux/clockchips.h>
#include <linux/io.h>
#include <asm/mach/time.h>
#include <mach/zynq_soc.h>
#include "common.h"

Go to the source code of this file.

Data Structures

struct  xttcpss_timer
 

Macros

#define IRQ_TIMERCOUNTER0   42
 
#define XTTCPSS_CLOCKSOURCE   0 /* Timer 1 as a generic timekeeping */
 
#define XTTCPSS_CLOCKEVENT   1 /* Timer 2 as a clock event */
 
#define XTTCPSS_TIMER_BASE   TTC0_BASE
 
#define XTTCPCC_EVENT_TIMER_IRQ   (IRQ_TIMERCOUNTER0 + 1)
 
#define XTTCPSS_CLK_CNTRL_OFFSET   0x00 /* Clock Control Reg, RW */
 
#define XTTCPSS_CNT_CNTRL_OFFSET   0x0C /* Counter Control Reg, RW */
 
#define XTTCPSS_COUNT_VAL_OFFSET   0x18 /* Counter Value Reg, RO */
 
#define XTTCPSS_INTR_VAL_OFFSET   0x24 /* Interval Count Reg, RW */
 
#define XTTCPSS_MATCH_1_OFFSET   0x30 /* Match 1 Value Reg, RW */
 
#define XTTCPSS_MATCH_2_OFFSET   0x3C /* Match 2 Value Reg, RW */
 
#define XTTCPSS_MATCH_3_OFFSET   0x48 /* Match 3 Value Reg, RW */
 
#define XTTCPSS_ISR_OFFSET   0x54 /* Interrupt Status Reg, RO */
 
#define XTTCPSS_IER_OFFSET   0x60 /* Interrupt Enable Reg, RW */
 
#define XTTCPSS_CNT_CNTRL_DISABLE_MASK   0x1
 
#define TIMER_RATE   (PERIPHERAL_CLOCK_RATE / 32)
 

Variables

struct sys_timer xttcpss_sys_timer
 

Macro Definition Documentation

#define IRQ_TIMERCOUNTER0   42

Definition at line 31 of file timer.c.

#define TIMER_RATE   (PERIPHERAL_CLOCK_RATE / 32)

Definition at line 70 of file timer.c.

#define XTTCPCC_EVENT_TIMER_IRQ   (IRQ_TIMERCOUNTER0 + 1)

Definition at line 51 of file timer.c.

#define XTTCPSS_CLK_CNTRL_OFFSET   0x00 /* Clock Control Reg, RW */

Definition at line 56 of file timer.c.

#define XTTCPSS_CLOCKEVENT   1 /* Timer 2 as a clock event */

Definition at line 48 of file timer.c.

#define XTTCPSS_CLOCKSOURCE   0 /* Timer 1 as a generic timekeeping */

Definition at line 47 of file timer.c.

#define XTTCPSS_CNT_CNTRL_DISABLE_MASK   0x1

Definition at line 66 of file timer.c.

#define XTTCPSS_CNT_CNTRL_OFFSET   0x0C /* Counter Control Reg, RW */

Definition at line 57 of file timer.c.

#define XTTCPSS_COUNT_VAL_OFFSET   0x18 /* Counter Value Reg, RO */

Definition at line 58 of file timer.c.

#define XTTCPSS_IER_OFFSET   0x60 /* Interrupt Enable Reg, RW */

Definition at line 64 of file timer.c.

#define XTTCPSS_INTR_VAL_OFFSET   0x24 /* Interval Count Reg, RW */

Definition at line 59 of file timer.c.

#define XTTCPSS_ISR_OFFSET   0x54 /* Interrupt Status Reg, RO */

Definition at line 63 of file timer.c.

#define XTTCPSS_MATCH_1_OFFSET   0x30 /* Match 1 Value Reg, RW */

Definition at line 60 of file timer.c.

#define XTTCPSS_MATCH_2_OFFSET   0x3C /* Match 2 Value Reg, RW */

Definition at line 61 of file timer.c.

#define XTTCPSS_MATCH_3_OFFSET   0x48 /* Match 3 Value Reg, RW */

Definition at line 62 of file timer.c.

#define XTTCPSS_TIMER_BASE   TTC0_BASE

Definition at line 50 of file timer.c.

Variable Documentation

struct sys_timer xttcpss_sys_timer
Initial value:
= {
.init = xttcpss_timer_init,
}

Definition at line 296 of file timer.c.