diff options
Diffstat (limited to 'arch/mn10300/include/asm/serial-regs.h')
-rw-r--r-- | arch/mn10300/include/asm/serial-regs.h | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/arch/mn10300/include/asm/serial-regs.h b/arch/mn10300/include/asm/serial-regs.h index 6498469e93ac..8320cda32f5a 100644 --- a/arch/mn10300/include/asm/serial-regs.h +++ b/arch/mn10300/include/asm/serial-regs.h | |||
@@ -20,18 +20,25 @@ | |||
20 | /* serial port 0 */ | 20 | /* serial port 0 */ |
21 | #define SC0CTR __SYSREG(0xd4002000, u16) /* control reg */ | 21 | #define SC0CTR __SYSREG(0xd4002000, u16) /* control reg */ |
22 | #define SC01CTR_CK 0x0007 /* clock source select */ | 22 | #define SC01CTR_CK 0x0007 /* clock source select */ |
23 | #define SC0CTR_CK_TM8UFLOW_8 0x0000 /* - 1/8 timer 8 underflow (serial port 0 only) */ | ||
24 | #define SC1CTR_CK_TM9UFLOW_8 0x0000 /* - 1/8 timer 9 underflow (serial port 1 only) */ | ||
25 | #define SC01CTR_CK_IOCLK_8 0x0001 /* - 1/8 IOCLK */ | 23 | #define SC01CTR_CK_IOCLK_8 0x0001 /* - 1/8 IOCLK */ |
26 | #define SC01CTR_CK_IOCLK_32 0x0002 /* - 1/32 IOCLK */ | 24 | #define SC01CTR_CK_IOCLK_32 0x0002 /* - 1/32 IOCLK */ |
25 | #define SC01CTR_CK_EXTERN_8 0x0006 /* - 1/8 external closk */ | ||
26 | #define SC01CTR_CK_EXTERN 0x0007 /* - external closk */ | ||
27 | #if defined(CONFIG_AM33_2) || defined(CONFIG_AM33_3) | ||
28 | #define SC0CTR_CK_TM8UFLOW_8 0x0000 /* - 1/8 timer 8 underflow (serial port 0 only) */ | ||
27 | #define SC0CTR_CK_TM2UFLOW_2 0x0003 /* - 1/2 timer 2 underflow (serial port 0 only) */ | 29 | #define SC0CTR_CK_TM2UFLOW_2 0x0003 /* - 1/2 timer 2 underflow (serial port 0 only) */ |
28 | #define SC1CTR_CK_TM3UFLOW_2 0x0003 /* - 1/2 timer 3 underflow (serial port 1 only) */ | 30 | #define SC0CTR_CK_TM0UFLOW_8 0x0004 /* - 1/8 timer 0 underflow (serial port 0 only) */ |
29 | #define SC0CTR_CK_TM0UFLOW_8 0x0004 /* - 1/8 timer 1 underflow (serial port 0 only) */ | ||
30 | #define SC1CTR_CK_TM1UFLOW_8 0x0004 /* - 1/8 timer 2 underflow (serial port 1 only) */ | ||
31 | #define SC0CTR_CK_TM2UFLOW_8 0x0005 /* - 1/8 timer 2 underflow (serial port 0 only) */ | 31 | #define SC0CTR_CK_TM2UFLOW_8 0x0005 /* - 1/8 timer 2 underflow (serial port 0 only) */ |
32 | #define SC1CTR_CK_TM9UFLOW_8 0x0000 /* - 1/8 timer 9 underflow (serial port 1 only) */ | ||
33 | #define SC1CTR_CK_TM3UFLOW_2 0x0003 /* - 1/2 timer 3 underflow (serial port 1 only) */ | ||
34 | #define SC1CTR_CK_TM1UFLOW_8 0x0004 /* - 1/8 timer 1 underflow (serial port 1 only) */ | ||
32 | #define SC1CTR_CK_TM3UFLOW_8 0x0005 /* - 1/8 timer 3 underflow (serial port 1 only) */ | 35 | #define SC1CTR_CK_TM3UFLOW_8 0x0005 /* - 1/8 timer 3 underflow (serial port 1 only) */ |
33 | #define SC01CTR_CK_EXTERN_8 0x0006 /* - 1/8 external closk */ | 36 | #else /* CONFIG_AM33_2 || CONFIG_AM33_3 */ |
34 | #define SC01CTR_CK_EXTERN 0x0007 /* - external closk */ | 37 | #define SC0CTR_CK_TM8UFLOW_8 0x0000 /* - 1/8 timer 8 underflow (serial port 0 only) */ |
38 | #define SC0CTR_CK_TM0UFLOW_8 0x0004 /* - 1/8 timer 0 underflow (serial port 0 only) */ | ||
39 | #define SC0CTR_CK_TM2UFLOW_8 0x0005 /* - 1/8 timer 2 underflow (serial port 0 only) */ | ||
40 | #define SC1CTR_CK_TM12UFLOW_8 0x0000 /* - 1/8 timer 12 underflow (serial port 1 only) */ | ||
41 | #endif /* CONFIG_AM33_2 || CONFIG_AM33_3 */ | ||
35 | #define SC01CTR_STB 0x0008 /* stop bit select */ | 42 | #define SC01CTR_STB 0x0008 /* stop bit select */ |
36 | #define SC01CTR_STB_1BIT 0x0000 /* - 1 stop bit */ | 43 | #define SC01CTR_STB_1BIT 0x0000 /* - 1 stop bit */ |
37 | #define SC01CTR_STB_2BIT 0x0008 /* - 2 stop bits */ | 44 | #define SC01CTR_STB_2BIT 0x0008 /* - 2 stop bits */ |
@@ -100,11 +107,23 @@ | |||
100 | 107 | ||
101 | /* serial port 2 */ | 108 | /* serial port 2 */ |
102 | #define SC2CTR __SYSREG(0xd4002020, u16) /* control reg */ | 109 | #define SC2CTR __SYSREG(0xd4002020, u16) /* control reg */ |
110 | #ifdef CONFIG_AM33_2 | ||
103 | #define SC2CTR_CK 0x0003 /* clock source select */ | 111 | #define SC2CTR_CK 0x0003 /* clock source select */ |
104 | #define SC2CTR_CK_TM10UFLOW 0x0000 /* - timer 10 underflow */ | 112 | #define SC2CTR_CK_TM10UFLOW 0x0000 /* - timer 10 underflow */ |
105 | #define SC2CTR_CK_TM2UFLOW 0x0001 /* - timer 2 underflow */ | 113 | #define SC2CTR_CK_TM2UFLOW 0x0001 /* - timer 2 underflow */ |
106 | #define SC2CTR_CK_EXTERN 0x0002 /* - external closk */ | 114 | #define SC2CTR_CK_EXTERN 0x0002 /* - external closk */ |
107 | #define SC2CTR_CK_TM3UFLOW 0x0003 /* - timer 3 underflow */ | 115 | #define SC2CTR_CK_TM3UFLOW 0x0003 /* - timer 3 underflow */ |
116 | #else /* CONFIG_AM33_2 */ | ||
117 | #define SC2CTR_CK 0x0007 /* clock source select */ | ||
118 | #define SC2CTR_CK_TM9UFLOW_8 0x0000 /* - 1/8 timer 9 underflow */ | ||
119 | #define SC2CTR_CK_IOCLK_8 0x0001 /* - 1/8 IOCLK */ | ||
120 | #define SC2CTR_CK_IOCLK_32 0x0002 /* - 1/32 IOCLK */ | ||
121 | #define SC2CTR_CK_TM3UFLOW_2 0x0003 /* - 1/2 timer 3 underflow */ | ||
122 | #define SC2CTR_CK_TM1UFLOW_8 0x0004 /* - 1/8 timer 1 underflow */ | ||
123 | #define SC2CTR_CK_TM3UFLOW_8 0x0005 /* - 1/8 timer 3 underflow */ | ||
124 | #define SC2CTR_CK_EXTERN_8 0x0006 /* - 1/8 external closk */ | ||
125 | #define SC2CTR_CK_EXTERN 0x0007 /* - external closk */ | ||
126 | #endif /* CONFIG_AM33_2 */ | ||
108 | #define SC2CTR_STB 0x0008 /* stop bit select */ | 127 | #define SC2CTR_STB 0x0008 /* stop bit select */ |
109 | #define SC2CTR_STB_1BIT 0x0000 /* - 1 stop bit */ | 128 | #define SC2CTR_STB_1BIT 0x0000 /* - 1 stop bit */ |
110 | #define SC2CTR_STB_2BIT 0x0008 /* - 2 stop bits */ | 129 | #define SC2CTR_STB_2BIT 0x0008 /* - 2 stop bits */ |
@@ -134,9 +153,14 @@ | |||
134 | #define SC2ICR_RES 0x04 /* receive error select */ | 153 | #define SC2ICR_RES 0x04 /* receive error select */ |
135 | #define SC2ICR_RI 0x01 /* receive interrupt cause */ | 154 | #define SC2ICR_RI 0x01 /* receive interrupt cause */ |
136 | 155 | ||
137 | #define SC2TXB __SYSREG(0xd4002018, u8) /* transmit buffer reg */ | 156 | #define SC2TXB __SYSREG(0xd4002028, u8) /* transmit buffer reg */ |
138 | #define SC2RXB __SYSREG(0xd4002019, u8) /* receive buffer reg */ | 157 | #define SC2RXB __SYSREG(0xd4002029, u8) /* receive buffer reg */ |
139 | #define SC2STR __SYSREG(0xd400201c, u8) /* status reg */ | 158 | |
159 | #ifdef CONFIG_AM33_2 | ||
160 | #define SC2STR __SYSREG(0xd400202c, u8) /* status reg */ | ||
161 | #else /* CONFIG_AM33_2 */ | ||
162 | #define SC2STR __SYSREG(0xd400202c, u16) /* status reg */ | ||
163 | #endif /* CONFIG_AM33_2 */ | ||
140 | #define SC2STR_OEF 0x0001 /* overrun error found */ | 164 | #define SC2STR_OEF 0x0001 /* overrun error found */ |
141 | #define SC2STR_PEF 0x0002 /* parity error found */ | 165 | #define SC2STR_PEF 0x0002 /* parity error found */ |
142 | #define SC2STR_FEF 0x0004 /* framing error found */ | 166 | #define SC2STR_FEF 0x0004 /* framing error found */ |
@@ -146,10 +170,17 @@ | |||
146 | #define SC2STR_RXF 0x0040 /* receive status */ | 170 | #define SC2STR_RXF 0x0040 /* receive status */ |
147 | #define SC2STR_TXF 0x0080 /* transmit status */ | 171 | #define SC2STR_TXF 0x0080 /* transmit status */ |
148 | 172 | ||
173 | #ifdef CONFIG_AM33_2 | ||
149 | #define SC2TIM __SYSREG(0xd400202d, u8) /* status reg */ | 174 | #define SC2TIM __SYSREG(0xd400202d, u8) /* status reg */ |
175 | #endif | ||
150 | 176 | ||
177 | #ifdef CONFIG_AM33_2 | ||
151 | #define SC2RXIRQ 24 /* serial 2 Receive IRQ */ | 178 | #define SC2RXIRQ 24 /* serial 2 Receive IRQ */ |
152 | #define SC2TXIRQ 25 /* serial 2 Transmit IRQ */ | 179 | #define SC2TXIRQ 25 /* serial 2 Transmit IRQ */ |
180 | #else /* CONFIG_AM33_2 */ | ||
181 | #define SC2RXIRQ 68 /* serial 2 Receive IRQ */ | ||
182 | #define SC2TXIRQ 69 /* serial 2 Transmit IRQ */ | ||
183 | #endif /* CONFIG_AM33_2 */ | ||
153 | 184 | ||
154 | #define SC2RXICR GxICR(SC2RXIRQ) /* serial 2 receive intr ctrl reg */ | 185 | #define SC2RXICR GxICR(SC2RXIRQ) /* serial 2 receive intr ctrl reg */ |
155 | #define SC2TXICR GxICR(SC2TXIRQ) /* serial 2 transmit intr ctrl reg */ | 186 | #define SC2TXICR GxICR(SC2TXIRQ) /* serial 2 transmit intr ctrl reg */ |