aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sh-sci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r--drivers/serial/sh-sci.c39
1 files changed, 35 insertions, 4 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 053fca41b08a..73440e26834b 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)
306static 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 */
306static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) 339static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
@@ -1276,7 +1309,7 @@ static int __init sci_console_init(void)
1276console_initcall(sci_console_init); 1309console_initcall(sci_console_init);
1277#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ 1310#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
1278 1311
1279#ifdef CONFIG_SH_KGDB 1312#ifdef CONFIG_SH_KGDB_CONSOLE
1280/* 1313/*
1281 * FIXME: Most of this can go away.. at the moment, we rely on 1314 * FIXME: Most of this can go away.. at the moment, we rely on
1282 * arch/sh/kernel/setup.c to do the command line parsing for kgdb, though 1315 * arch/sh/kernel/setup.c to do the command line parsing for kgdb, though
@@ -1334,9 +1367,7 @@ int __init kgdb_console_setup(struct console *co, char *options)
1334 1367
1335 return uart_set_options(port, co, baud, parity, bits, flow); 1368 return uart_set_options(port, co, baud, parity, bits, flow);
1336} 1369}
1337#endif /* CONFIG_SH_KGDB */
1338 1370
1339#ifdef CONFIG_SH_KGDB_CONSOLE
1340static struct console kgdb_console = { 1371static struct console kgdb_console = {
1341 .name = "ttySC", 1372 .name = "ttySC",
1342 .device = uart_console_device, 1373 .device = uart_console_device,
@@ -1432,7 +1463,7 @@ static int __devinit sci_probe(struct platform_device *dev)
1432 1463
1433#ifdef CONFIG_CPU_FREQ 1464#ifdef CONFIG_CPU_FREQ
1434 cpufreq_register_notifier(&sci_nb, CPUFREQ_TRANSITION_NOTIFIER); 1465 cpufreq_register_notifier(&sci_nb, CPUFREQ_TRANSITION_NOTIFIER);
1435 dev_info(&dev->dev, "sci: CPU frequency notifier registered\n"); 1466 dev_info(&dev->dev, "CPU frequency notifier registered\n");
1436#endif 1467#endif
1437 1468
1438#ifdef CONFIG_SH_STANDARD_BIOS 1469#ifdef CONFIG_SH_STANDARD_BIOS