5 * Following are the generic definitions for the ADDI-DATA timer/counter/
6 * watchdog (TCW) registers and bits. Some of the registers are not used
7 * depending on the use of the TCW.
10 #define ADDI_TCW_VAL_REG 0x00
12 #define ADDI_TCW_SYNC_REG 0x00
13 #define ADDI_TCW_SYNC_CTR_TRIG BIT(8)
14 #define ADDI_TCW_SYNC_CTR_DIS BIT(7)
15 #define ADDI_TCW_SYNC_CTR_ENA BIT(6)
16 #define ADDI_TCW_SYNC_TIMER_TRIG BIT(5)
17 #define ADDI_TCW_SYNC_TIMER_DIS BIT(4)
18 #define ADDI_TCW_SYNC_TIMER_ENA BIT(3)
19 #define ADDI_TCW_SYNC_WDOG_TRIG BIT(2)
20 #define ADDI_TCW_SYNC_WDOG_DIS BIT(1)
21 #define ADDI_TCW_SYNC_WDOG_ENA BIT(0)
23 #define ADDI_TCW_RELOAD_REG 0x04
25 #define ADDI_TCW_TIMEBASE_REG 0x08
27 #define ADDI_TCW_CTRL_REG 0x0c
28 #define ADDI_TCW_CTRL_EXT_CLK_STATUS BIT(21)
29 #define ADDI_TCW_CTRL_CASCADE BIT(20)
30 #define ADDI_TCW_CTRL_CNTR_ENA BIT(19)
31 #define ADDI_TCW_CTRL_CNT_UP BIT(18)
32 #define ADDI_TCW_CTRL_EXT_CLK(x) ((x) << 16)
33 #define ADDI_TCW_CTRL_OUT(x) ((x) << 11)
34 #define ADDI_TCW_CTRL_GATE BIT(10)
35 #define ADDI_TCW_CTRL_TRIG BIT(9)
36 #define ADDI_TCW_CTRL_EXT_GATE(x) ((x) << 7)
37 #define ADDI_TCW_CTRL_EXT_TRIG(x) ((x) << 5)
38 #define ADDI_TCW_CTRL_TIMER_ENA BIT(4)
39 #define ADDI_TCW_CTRL_RESET_ENA BIT(3)
40 #define ADDI_TCW_CTRL_WARN_ENA BIT(2)
41 #define ADDI_TCW_CTRL_IRQ_ENA BIT(1)
42 #define ADDI_TCW_CTRL_ENA BIT(0)
44 #define ADDI_TCW_STATUS_REG 0x10
45 #define ADDI_TCW_STATUS_SOFT_CLR BIT(3)
46 #define ADDI_TCW_STATUS_SOFT_TRIG BIT(1)
47 #define ADDI_TCW_STATUS_OVERFLOW BIT(0)
49 #define ADDI_TCW_IRQ_REG 0x14
50 #define ADDI_TCW_IRQ BIT(0)
52 #define ADDI_TCW_WARN_TIMEVAL_REG 0x18
54 #define ADDI_TCW_WARN_TIMEBASE_REG 0x1c