Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
timer.h File Reference

Go to the source code of this file.

Macros

#define JZ_REG_TIMER_STOP   0x0C
 
#define JZ_REG_TIMER_STOP_SET   0x1C
 
#define JZ_REG_TIMER_STOP_CLEAR   0x2C
 
#define JZ_REG_TIMER_ENABLE   0x00
 
#define JZ_REG_TIMER_ENABLE_SET   0x04
 
#define JZ_REG_TIMER_ENABLE_CLEAR   0x08
 
#define JZ_REG_TIMER_FLAG   0x10
 
#define JZ_REG_TIMER_FLAG_SET   0x14
 
#define JZ_REG_TIMER_FLAG_CLEAR   0x18
 
#define JZ_REG_TIMER_MASK   0x20
 
#define JZ_REG_TIMER_MASK_SET   0x24
 
#define JZ_REG_TIMER_MASK_CLEAR   0x28
 
#define JZ_REG_TIMER_DFR(x)   (((x) * 0x10) + 0x30)
 
#define JZ_REG_TIMER_DHR(x)   (((x) * 0x10) + 0x34)
 
#define JZ_REG_TIMER_CNT(x)   (((x) * 0x10) + 0x38)
 
#define JZ_REG_TIMER_CTRL(x)   (((x) * 0x10) + 0x3C)
 
#define JZ_TIMER_IRQ_HALF(x)   BIT((x) + 0x10)
 
#define JZ_TIMER_IRQ_FULL(x)   BIT(x)
 
#define JZ_TIMER_CTRL_PWM_ABBRUPT_SHUTDOWN   BIT(9)
 
#define JZ_TIMER_CTRL_PWM_ACTIVE_LOW   BIT(8)
 
#define JZ_TIMER_CTRL_PWM_ENABLE   BIT(7)
 
#define JZ_TIMER_CTRL_PRESCALE_MASK   0x1c
 
#define JZ_TIMER_CTRL_PRESCALE_OFFSET   0x3
 
#define JZ_TIMER_CTRL_PRESCALE_1   (0 << 3)
 
#define JZ_TIMER_CTRL_PRESCALE_4   (1 << 3)
 
#define JZ_TIMER_CTRL_PRESCALE_16   (2 << 3)
 
#define JZ_TIMER_CTRL_PRESCALE_64   (3 << 3)
 
#define JZ_TIMER_CTRL_PRESCALE_256   (4 << 3)
 
#define JZ_TIMER_CTRL_PRESCALE_1024   (5 << 3)
 
#define JZ_TIMER_CTRL_PRESCALER(x)   ((x) << JZ_TIMER_CTRL_PRESCALE_OFFSET)
 
#define JZ_TIMER_CTRL_SRC_EXT   BIT(2)
 
#define JZ_TIMER_CTRL_SRC_RTC   BIT(1)
 
#define JZ_TIMER_CTRL_SRC_PCLK   BIT(0)
 

Functions

void __init jz4740_timer_init (void)
 
void jz4740_timer_enable_watchdog (void)
 
void jz4740_timer_disable_watchdog (void)
 

Variables

void __iomemjz4740_timer_base
 

Macro Definition Documentation

#define JZ_REG_TIMER_CNT (   x)    (((x) * 0x10) + 0x38)

Definition at line 34 of file timer.h.

#define JZ_REG_TIMER_CTRL (   x)    (((x) * 0x10) + 0x3C)

Definition at line 35 of file timer.h.

#define JZ_REG_TIMER_DFR (   x)    (((x) * 0x10) + 0x30)

Definition at line 32 of file timer.h.

#define JZ_REG_TIMER_DHR (   x)    (((x) * 0x10) + 0x34)

Definition at line 33 of file timer.h.

#define JZ_REG_TIMER_ENABLE   0x00

Definition at line 22 of file timer.h.

#define JZ_REG_TIMER_ENABLE_CLEAR   0x08

Definition at line 24 of file timer.h.

#define JZ_REG_TIMER_ENABLE_SET   0x04

Definition at line 23 of file timer.h.

#define JZ_REG_TIMER_FLAG   0x10

Definition at line 25 of file timer.h.

#define JZ_REG_TIMER_FLAG_CLEAR   0x18

Definition at line 27 of file timer.h.

#define JZ_REG_TIMER_FLAG_SET   0x14

Definition at line 26 of file timer.h.

#define JZ_REG_TIMER_MASK   0x20

Definition at line 28 of file timer.h.

#define JZ_REG_TIMER_MASK_CLEAR   0x28

Definition at line 30 of file timer.h.

#define JZ_REG_TIMER_MASK_SET   0x24

Definition at line 29 of file timer.h.

#define JZ_REG_TIMER_STOP   0x0C

Definition at line 19 of file timer.h.

#define JZ_REG_TIMER_STOP_CLEAR   0x2C

Definition at line 21 of file timer.h.

#define JZ_REG_TIMER_STOP_SET   0x1C

Definition at line 20 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_1   (0 << 3)

Definition at line 45 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_1024   (5 << 3)

Definition at line 50 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_16   (2 << 3)

Definition at line 47 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_256   (4 << 3)

Definition at line 49 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_4   (1 << 3)

Definition at line 46 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_64   (3 << 3)

Definition at line 48 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_MASK   0x1c

Definition at line 43 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALE_OFFSET   0x3

Definition at line 44 of file timer.h.

#define JZ_TIMER_CTRL_PRESCALER (   x)    ((x) << JZ_TIMER_CTRL_PRESCALE_OFFSET)

Definition at line 52 of file timer.h.

#define JZ_TIMER_CTRL_PWM_ABBRUPT_SHUTDOWN   BIT(9)

Definition at line 40 of file timer.h.

#define JZ_TIMER_CTRL_PWM_ACTIVE_LOW   BIT(8)

Definition at line 41 of file timer.h.

#define JZ_TIMER_CTRL_PWM_ENABLE   BIT(7)

Definition at line 42 of file timer.h.

#define JZ_TIMER_CTRL_SRC_EXT   BIT(2)

Definition at line 54 of file timer.h.

#define JZ_TIMER_CTRL_SRC_PCLK   BIT(0)

Definition at line 56 of file timer.h.

#define JZ_TIMER_CTRL_SRC_RTC   BIT(1)

Definition at line 55 of file timer.h.

#define JZ_TIMER_IRQ_FULL (   x)    BIT(x)

Definition at line 38 of file timer.h.

#define JZ_TIMER_IRQ_HALF (   x)    BIT((x) + 0x10)

Definition at line 37 of file timer.h.

Function Documentation

void jz4740_timer_disable_watchdog ( void  )

Definition at line 32 of file timer.c.

void jz4740_timer_enable_watchdog ( void  )

Definition at line 26 of file timer.c.

void __init jz4740_timer_init ( void  )

Definition at line 38 of file timer.c.

Variable Documentation

void __iomem* jz4740_timer_base

Definition at line 23 of file timer.c.