Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
timer64.c File Reference
#include <linux/clockchips.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
#include <asm/soc.h>
#include <asm/dscr.h>
#include <asm/special_insns.h>
#include <asm/timer64.h>

Go to the source code of this file.

Data Structures

struct  timer_regs
 

Macros

#define TCR_TSTATLO   0x001
 
#define TCR_INVOUTPLO   0x002
 
#define TCR_INVINPLO   0x004
 
#define TCR_CPLO   0x008
 
#define TCR_ENAMODELO_ONCE   0x040
 
#define TCR_ENAMODELO_CONT   0x080
 
#define TCR_ENAMODELO_MASK   0x0c0
 
#define TCR_PWIDLO_MASK   0x030
 
#define TCR_CLKSRCLO   0x100
 
#define TCR_TIENLO   0x200
 
#define TCR_TSTATHI   (0x001 << 16)
 
#define TCR_INVOUTPHI   (0x002 << 16)
 
#define TCR_CPHI   (0x008 << 16)
 
#define TCR_PWIDHI_MASK   (0x030 << 16)
 
#define TCR_ENAMODEHI_ONCE   (0x040 << 16)
 
#define TCR_ENAMODEHI_CONT   (0x080 << 16)
 
#define TCR_ENAMODEHI_MASK   (0x0c0 << 16)
 
#define TGCR_TIMLORS   0x001
 
#define TGCR_TIMHIRS   0x002
 
#define TGCR_TIMMODE_UD32   0x004
 
#define TGCR_TIMMODE_WDT64   0x008
 
#define TGCR_TIMMODE_CD32   0x00c
 
#define TGCR_TIMMODE_MASK   0x00c
 
#define TGCR_PSCHI_MASK   (0x00f << 8)
 
#define TGCR_TDDRHI_MASK   (0x00f << 12)
 
#define TIMER_DIVISOR   ((soc_readl(&timer->emumgt) & (0xf << 16)) >> 16)
 
#define TIMER64_RATE   (c6x_core_freq / TIMER_DIVISOR)
 
#define TIMER64_MODE_DISABLED   0
 
#define TIMER64_MODE_ONE_SHOT   TCR_ENAMODELO_ONCE
 
#define TIMER64_MODE_PERIODIC   TCR_ENAMODELO_CONT
 

Functions

void __init timer64_init (void)
 

Macro Definition Documentation

#define TCR_CLKSRCLO   0x100

Definition at line 45 of file timer64.c.

#define TCR_CPHI   (0x008 << 16)

Definition at line 49 of file timer64.c.

#define TCR_CPLO   0x008

Definition at line 40 of file timer64.c.

#define TCR_ENAMODEHI_CONT   (0x080 << 16)

Definition at line 52 of file timer64.c.

#define TCR_ENAMODEHI_MASK   (0x0c0 << 16)

Definition at line 53 of file timer64.c.

#define TCR_ENAMODEHI_ONCE   (0x040 << 16)

Definition at line 51 of file timer64.c.

#define TCR_ENAMODELO_CONT   0x080

Definition at line 42 of file timer64.c.

#define TCR_ENAMODELO_MASK   0x0c0

Definition at line 43 of file timer64.c.

#define TCR_ENAMODELO_ONCE   0x040

Definition at line 41 of file timer64.c.

#define TCR_INVINPLO   0x004

Definition at line 39 of file timer64.c.

#define TCR_INVOUTPHI   (0x002 << 16)

Definition at line 48 of file timer64.c.

#define TCR_INVOUTPLO   0x002

Definition at line 38 of file timer64.c.

#define TCR_PWIDHI_MASK   (0x030 << 16)

Definition at line 50 of file timer64.c.

#define TCR_PWIDLO_MASK   0x030

Definition at line 44 of file timer64.c.

#define TCR_TIENLO   0x200

Definition at line 46 of file timer64.c.

#define TCR_TSTATHI   (0x001 << 16)

Definition at line 47 of file timer64.c.

#define TCR_TSTATLO   0x001

Definition at line 37 of file timer64.c.

#define TGCR_PSCHI_MASK   (0x00f << 8)

Definition at line 61 of file timer64.c.

#define TGCR_TDDRHI_MASK   (0x00f << 12)

Definition at line 62 of file timer64.c.

#define TGCR_TIMHIRS   0x002

Definition at line 56 of file timer64.c.

#define TGCR_TIMLORS   0x001

Definition at line 55 of file timer64.c.

#define TGCR_TIMMODE_CD32   0x00c

Definition at line 59 of file timer64.c.

#define TGCR_TIMMODE_MASK   0x00c

Definition at line 60 of file timer64.c.

#define TGCR_TIMMODE_UD32   0x004

Definition at line 57 of file timer64.c.

#define TGCR_TIMMODE_WDT64   0x008

Definition at line 58 of file timer64.c.

#define TIMER64_MODE_DISABLED   0

Definition at line 73 of file timer64.c.

#define TIMER64_MODE_ONE_SHOT   TCR_ENAMODELO_ONCE

Definition at line 74 of file timer64.c.

#define TIMER64_MODE_PERIODIC   TCR_ENAMODELO_CONT

Definition at line 75 of file timer64.c.

#define TIMER64_RATE   (c6x_core_freq / TIMER_DIVISOR)

Definition at line 71 of file timer64.c.

#define TIMER_DIVISOR   ((soc_readl(&timer->emumgt) & (0xf << 16)) >> 16)

Definition at line 68 of file timer64.c.

Function Documentation

void __init timer64_init ( void  )

Definition at line 176 of file timer64.c.