From 53b3988d474435254a3b053a68bb24ce9e439295 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 15 Jun 2000 01:55:58 +0000 Subject: Merge with 2.3.99-pre9. --- drivers/char/sh-sci.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'drivers/char/sh-sci.c') diff --git a/drivers/char/sh-sci.c b/drivers/char/sh-sci.c index 8ab735cdc..05bfcb607 100644 --- a/drivers/char/sh-sci.c +++ b/drivers/char/sh-sci.c @@ -189,10 +189,35 @@ static void sci_set_termios_cflag(struct sci_port *port) ctrl_out(smr_val, SCSMR); #if defined(CONFIG_SH_SCIF_SERIAL) +#if defined(__sh3__) + { /* For SH7709, SH7709A, SH7729 */ + unsigned short data; + + /* We need to set SCPCR to enable RTS/CTS */ + data = ctrl_inw(SCPCR); + /* Clear out SCP7MD1,0, SCP6MD1,0, SCP4MD1,0*/ + ctrl_outw(data&0x0fcf, SCPCR); + } +#endif if (C_CRTSCTS(port->gs.tty)) fcr_val |= 0x08; - else + else { +#if defined(__sh3__) + unsigned short data; + + /* We need to set SCPCR to enable RTS/CTS */ + data = ctrl_inw(SCPCR); + /* Clear out SCP7MD1,0, SCP4MD1,0, + Set SCP6MD1,0 = {01} (output) */ + ctrl_outw((data&0x0fcf)|0x1000, SCPCR); + + data = ctrl_inb(SCPDR); + /* Set /RTS2 (bit6) = 0 */ + ctrl_outb(data&0xbf, SCPDR); +#elif defined(__SH4__) ctrl_outw(0x0080, SCSPTR); /* Set RTS = 1 */ +#endif + } ctrl_out(fcr_val, SCFCR); #endif @@ -721,7 +746,7 @@ int __init sci_init(void) int i; for (i=SCI_ERI_IRQ; i