diff options
-rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 16 | ||||
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 19 | ||||
-rw-r--r-- | include/linux/serial_sci.h | 1 |
3 files changed, 32 insertions, 4 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index a43124e608c3..0bd744f9a3b7 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c | |||
@@ -176,10 +176,12 @@ static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups, | |||
176 | static struct plat_sci_port scif0_platform_data = { | 176 | static struct plat_sci_port scif0_platform_data = { |
177 | .mapbase = 0xfffe8000, | 177 | .mapbase = 0xfffe8000, |
178 | .flags = UPF_BOOT_AUTOCONF, | 178 | .flags = UPF_BOOT_AUTOCONF, |
179 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 179 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
180 | SCSCR_REIE, | ||
180 | .scbrr_algo_id = SCBRR_ALGO_2, | 181 | .scbrr_algo_id = SCBRR_ALGO_2, |
181 | .type = PORT_SCIF, | 182 | .type = PORT_SCIF, |
182 | .irqs = { 192, 192, 192, 192 }, | 183 | .irqs = { 192, 192, 192, 192 }, |
184 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
183 | }; | 185 | }; |
184 | 186 | ||
185 | static struct platform_device scif0_device = { | 187 | static struct platform_device scif0_device = { |
@@ -193,10 +195,12 @@ static struct platform_device scif0_device = { | |||
193 | static struct plat_sci_port scif1_platform_data = { | 195 | static struct plat_sci_port scif1_platform_data = { |
194 | .mapbase = 0xfffe8800, | 196 | .mapbase = 0xfffe8800, |
195 | .flags = UPF_BOOT_AUTOCONF, | 197 | .flags = UPF_BOOT_AUTOCONF, |
196 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 198 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
199 | SCSCR_REIE, | ||
197 | .scbrr_algo_id = SCBRR_ALGO_2, | 200 | .scbrr_algo_id = SCBRR_ALGO_2, |
198 | .type = PORT_SCIF, | 201 | .type = PORT_SCIF, |
199 | .irqs = { 196, 196, 196, 196 }, | 202 | .irqs = { 196, 196, 196, 196 }, |
203 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
200 | }; | 204 | }; |
201 | 205 | ||
202 | static struct platform_device scif1_device = { | 206 | static struct platform_device scif1_device = { |
@@ -210,10 +214,12 @@ static struct platform_device scif1_device = { | |||
210 | static struct plat_sci_port scif2_platform_data = { | 214 | static struct plat_sci_port scif2_platform_data = { |
211 | .mapbase = 0xfffe9000, | 215 | .mapbase = 0xfffe9000, |
212 | .flags = UPF_BOOT_AUTOCONF, | 216 | .flags = UPF_BOOT_AUTOCONF, |
213 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 217 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
218 | SCSCR_REIE, | ||
214 | .scbrr_algo_id = SCBRR_ALGO_2, | 219 | .scbrr_algo_id = SCBRR_ALGO_2, |
215 | .type = PORT_SCIF, | 220 | .type = PORT_SCIF, |
216 | .irqs = { 200, 200, 200, 200 }, | 221 | .irqs = { 200, 200, 200, 200 }, |
222 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
217 | }; | 223 | }; |
218 | 224 | ||
219 | static struct platform_device scif2_device = { | 225 | static struct platform_device scif2_device = { |
@@ -227,10 +233,12 @@ static struct platform_device scif2_device = { | |||
227 | static struct plat_sci_port scif3_platform_data = { | 233 | static struct plat_sci_port scif3_platform_data = { |
228 | .mapbase = 0xfffe9800, | 234 | .mapbase = 0xfffe9800, |
229 | .flags = UPF_BOOT_AUTOCONF, | 235 | .flags = UPF_BOOT_AUTOCONF, |
230 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, | 236 | .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | |
237 | SCSCR_REIE, | ||
231 | .scbrr_algo_id = SCBRR_ALGO_2, | 238 | .scbrr_algo_id = SCBRR_ALGO_2, |
232 | .type = PORT_SCIF, | 239 | .type = PORT_SCIF, |
233 | .irqs = { 204, 204, 204, 204 }, | 240 | .irqs = { 204, 204, 204, 204 }, |
241 | .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
234 | }; | 242 | }; |
235 | 243 | ||
236 | static struct platform_device scif3_device = { | 244 | static struct platform_device scif3_device = { |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 9871c57b348e..1b6ec568f32a 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -207,6 +207,25 @@ static struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = { | |||
207 | }, | 207 | }, |
208 | 208 | ||
209 | /* | 209 | /* |
210 | * Common SH-2(A) SCIF definitions for ports with FIFO data | ||
211 | * count registers. | ||
212 | */ | ||
213 | [SCIx_SH2_SCIF_FIFODATA_REGTYPE] = { | ||
214 | [SCSMR] = { 0x00, 16 }, | ||
215 | [SCBRR] = { 0x04, 8 }, | ||
216 | [SCSCR] = { 0x08, 16 }, | ||
217 | [SCxTDR] = { 0x0c, 8 }, | ||
218 | [SCxSR] = { 0x10, 16 }, | ||
219 | [SCxRDR] = { 0x14, 8 }, | ||
220 | [SCFCR] = { 0x18, 16 }, | ||
221 | [SCFDR] = { 0x1c, 16 }, | ||
222 | [SCTFDR] = sci_reg_invalid, | ||
223 | [SCRFDR] = sci_reg_invalid, | ||
224 | [SCSPTR] = { 0x20, 16 }, | ||
225 | [SCLSR] = { 0x24, 16 }, | ||
226 | }, | ||
227 | |||
228 | /* | ||
210 | * Common SH-3 SCIF definitions. | 229 | * Common SH-3 SCIF definitions. |
211 | */ | 230 | */ |
212 | [SCIx_SH3_SCIF_REGTYPE] = { | 231 | [SCIx_SH3_SCIF_REGTYPE] = { |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 8bffe9ae2ca0..5f3939c67dd8 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -67,6 +67,7 @@ enum { | |||
67 | SCIx_IRDA_REGTYPE, | 67 | SCIx_IRDA_REGTYPE, |
68 | SCIx_SCIFA_REGTYPE, | 68 | SCIx_SCIFA_REGTYPE, |
69 | SCIx_SCIFB_REGTYPE, | 69 | SCIx_SCIFB_REGTYPE, |
70 | SCIx_SH2_SCIF_FIFODATA_REGTYPE, | ||
70 | SCIx_SH3_SCIF_REGTYPE, | 71 | SCIx_SH3_SCIF_REGTYPE, |
71 | SCIx_SH4_SCIF_REGTYPE, | 72 | SCIx_SH4_SCIF_REGTYPE, |
72 | SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, | 73 | SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, |