blob: 4a85fb4638480732720c426425de25667cb5cc32 [file] [log] [blame]
GuanXuetaob08b4f82011-02-26 20:08:36 +08001/*
2 * PKUnity Operating System Timer (OST) Registers
3 */
4/*
5 * Match Reg 0 OST_OSMR0
6 */
GuanXuetao1cf46c42011-03-04 18:07:48 +08007#define OST_OSMR0 (PKUNITY_OST_BASE + 0x0000)
GuanXuetaob08b4f82011-02-26 20:08:36 +08008/*
9 * Match Reg 1 OST_OSMR1
10 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080011#define OST_OSMR1 (PKUNITY_OST_BASE + 0x0004)
GuanXuetaob08b4f82011-02-26 20:08:36 +080012/*
13 * Match Reg 2 OST_OSMR2
14 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080015#define OST_OSMR2 (PKUNITY_OST_BASE + 0x0008)
GuanXuetaob08b4f82011-02-26 20:08:36 +080016/*
17 * Match Reg 3 OST_OSMR3
18 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080019#define OST_OSMR3 (PKUNITY_OST_BASE + 0x000C)
GuanXuetaob08b4f82011-02-26 20:08:36 +080020/*
21 * Counter Reg OST_OSCR
22 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080023#define OST_OSCR (PKUNITY_OST_BASE + 0x0010)
GuanXuetaob08b4f82011-02-26 20:08:36 +080024/*
25 * Status Reg OST_OSSR
26 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080027#define OST_OSSR (PKUNITY_OST_BASE + 0x0014)
GuanXuetaob08b4f82011-02-26 20:08:36 +080028/*
29 * Watchdog Enable Reg OST_OWER
30 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080031#define OST_OWER (PKUNITY_OST_BASE + 0x0018)
GuanXuetaob08b4f82011-02-26 20:08:36 +080032/*
33 * Interrupt Enable Reg OST_OIER
34 */
GuanXuetao1cf46c42011-03-04 18:07:48 +080035#define OST_OIER (PKUNITY_OST_BASE + 0x001C)
Thierry Redingd1b68862012-09-14 16:14:25 +080036
GuanXuetaob08b4f82011-02-26 20:08:36 +080037/*
Thierry Redingd1b68862012-09-14 16:14:25 +080038 * PWM Registers: IO base address: PKUNITY_OST_BASE + 0x80
39 * PWCR: Pulse Width Control Reg
40 * DCCR: Duty Cycle Control Reg
41 * PCR: Period Control Reg
GuanXuetaob08b4f82011-02-26 20:08:36 +080042 */
Thierry Redingd1b68862012-09-14 16:14:25 +080043#define OST_PWM_PWCR (0x00)
44#define OST_PWM_DCCR (0x04)
45#define OST_PWM_PCR (0x08)
GuanXuetaob08b4f82011-02-26 20:08:36 +080046
47/*
48 * Match detected 0 OST_OSSR_M0
49 */
50#define OST_OSSR_M0 FIELD(1, 1, 0)
51/*
52 * Match detected 1 OST_OSSR_M1
53 */
54#define OST_OSSR_M1 FIELD(1, 1, 1)
55/*
56 * Match detected 2 OST_OSSR_M2
57 */
58#define OST_OSSR_M2 FIELD(1, 1, 2)
59/*
60 * Match detected 3 OST_OSSR_M3
61 */
62#define OST_OSSR_M3 FIELD(1, 1, 3)
63
64/*
65 * Interrupt enable 0 OST_OIER_E0
66 */
67#define OST_OIER_E0 FIELD(1, 1, 0)
68/*
69 * Interrupt enable 1 OST_OIER_E1
70 */
71#define OST_OIER_E1 FIELD(1, 1, 1)
72/*
73 * Interrupt enable 2 OST_OIER_E2
74 */
75#define OST_OIER_E2 FIELD(1, 1, 2)
76/*
77 * Interrupt enable 3 OST_OIER_E3
78 */
79#define OST_OIER_E3 FIELD(1, 1, 3)
80
81/*
82 * Watchdog Match Enable OST_OWER_WME
83 */
84#define OST_OWER_WME FIELD(1, 1, 0)
85
86/*
87 * PWM Full Duty Cycle OST_PWMDCCR_FDCYCLE
88 */
89#define OST_PWMDCCR_FDCYCLE FIELD(1, 1, 10)
90