Linux 3.17-rc2
[linux/fpc-iii.git] / arch / unicore32 / include / mach / regs-ost.h
blob4a85fb4638480732720c426425de25667cb5cc32
1 /*
2 * PKUnity Operating System Timer (OST) Registers
3 */
4 /*
5 * Match Reg 0 OST_OSMR0
6 */
7 #define OST_OSMR0 (PKUNITY_OST_BASE + 0x0000)
8 /*
9 * Match Reg 1 OST_OSMR1
11 #define OST_OSMR1 (PKUNITY_OST_BASE + 0x0004)
13 * Match Reg 2 OST_OSMR2
15 #define OST_OSMR2 (PKUNITY_OST_BASE + 0x0008)
17 * Match Reg 3 OST_OSMR3
19 #define OST_OSMR3 (PKUNITY_OST_BASE + 0x000C)
21 * Counter Reg OST_OSCR
23 #define OST_OSCR (PKUNITY_OST_BASE + 0x0010)
25 * Status Reg OST_OSSR
27 #define OST_OSSR (PKUNITY_OST_BASE + 0x0014)
29 * Watchdog Enable Reg OST_OWER
31 #define OST_OWER (PKUNITY_OST_BASE + 0x0018)
33 * Interrupt Enable Reg OST_OIER
35 #define OST_OIER (PKUNITY_OST_BASE + 0x001C)
38 * 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
43 #define OST_PWM_PWCR (0x00)
44 #define OST_PWM_DCCR (0x04)
45 #define OST_PWM_PCR (0x08)
48 * Match detected 0 OST_OSSR_M0
50 #define OST_OSSR_M0 FIELD(1, 1, 0)
52 * Match detected 1 OST_OSSR_M1
54 #define OST_OSSR_M1 FIELD(1, 1, 1)
56 * Match detected 2 OST_OSSR_M2
58 #define OST_OSSR_M2 FIELD(1, 1, 2)
60 * Match detected 3 OST_OSSR_M3
62 #define OST_OSSR_M3 FIELD(1, 1, 3)
65 * Interrupt enable 0 OST_OIER_E0
67 #define OST_OIER_E0 FIELD(1, 1, 0)
69 * Interrupt enable 1 OST_OIER_E1
71 #define OST_OIER_E1 FIELD(1, 1, 1)
73 * Interrupt enable 2 OST_OIER_E2
75 #define OST_OIER_E2 FIELD(1, 1, 2)
77 * Interrupt enable 3 OST_OIER_E3
79 #define OST_OIER_E3 FIELD(1, 1, 3)
82 * Watchdog Match Enable OST_OWER_WME
84 #define OST_OWER_WME FIELD(1, 1, 0)
87 * PWM Full Duty Cycle OST_PWMDCCR_FDCYCLE
89 #define OST_PWMDCCR_FDCYCLE FIELD(1, 1, 10)