diff options
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r-- | drivers/serial/sh-sci.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index e4abd3a79983..81318c580e22 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO) | 4 | * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO) |
5 | * | 5 | * |
6 | * Copyright (C) 2002 - 2006 Paul Mundt | 6 | * Copyright (C) 2002 - 2006 Paul Mundt |
7 | * Modified to support SH7720 SCIF. Markus Brunner, Mark Jonas (Jul 2007). | ||
7 | * | 8 | * |
8 | * based off of the old drivers/char/sh-sci.c by: | 9 | * based off of the old drivers/char/sh-sci.c by: |
9 | * | 10 | * |
@@ -301,6 +302,38 @@ static void sci_init_pins_scif(struct uart_port* port, unsigned int cflag) | |||
301 | } | 302 | } |
302 | sci_out(port, SCFCR, fcr_val); | 303 | sci_out(port, SCFCR, fcr_val); |
303 | } | 304 | } |
305 | #elif defined(CONFIG_CPU_SUBTYPE_SH7720) | ||
306 | static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) | ||
307 | { | ||
308 | unsigned int fcr_val = 0; | ||
309 | unsigned short data; | ||
310 | |||
311 | if (cflag & CRTSCTS) { | ||
312 | /* enable RTS/CTS */ | ||
313 | if (port->mapbase == 0xa4430000) { /* SCIF0 */ | ||
314 | /* Clear PTCR bit 9-2; enable all scif pins but sck */ | ||
315 | data = ctrl_inw(PORT_PTCR); | ||
316 | ctrl_outw((data & 0xfc03), PORT_PTCR); | ||
317 | } else if (port->mapbase == 0xa4438000) { /* SCIF1 */ | ||
318 | /* Clear PVCR bit 9-2 */ | ||
319 | data = ctrl_inw(PORT_PVCR); | ||
320 | ctrl_outw((data & 0xfc03), PORT_PVCR); | ||
321 | } | ||
322 | fcr_val |= SCFCR_MCE; | ||
323 | } else { | ||
324 | if (port->mapbase == 0xa4430000) { /* SCIF0 */ | ||
325 | /* Clear PTCR bit 5-2; enable only tx and rx */ | ||
326 | data = ctrl_inw(PORT_PTCR); | ||
327 | ctrl_outw((data & 0xffc3), PORT_PTCR); | ||
328 | } else if (port->mapbase == 0xa4438000) { /* SCIF1 */ | ||
329 | /* Clear PVCR bit 5-2 */ | ||
330 | data = ctrl_inw(PORT_PVCR); | ||
331 | ctrl_outw((data & 0xffc3), PORT_PVCR); | ||
332 | } | ||
333 | } | ||
334 | sci_out(port, SCFCR, fcr_val); | ||
335 | } | ||
336 | |||
304 | #elif defined(CONFIG_CPU_SH3) | 337 | #elif defined(CONFIG_CPU_SH3) |
305 | /* For SH7705, SH7706, SH7707, SH7709, SH7709A, SH7729 */ | 338 | /* For SH7705, SH7706, SH7707, SH7709, SH7709A, SH7729 */ |
306 | static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) | 339 | static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) |