diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2007-08-22 17:01:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-22 22:52:44 -0400 |
commit | 999999616e45c603da45ee2667741fb7348629a5 (patch) | |
tree | 545ef6aee9d6a95804899514c768e34297d7042e /drivers | |
parent | 84f8c6fc0e3b6e48fd22c28fc3bb666a130b3994 (diff) |
serial_txx9: Fix modem control line handling
This chip does not have modem control lines. Return TIOCM_CAR and
TIOCM_DSR always on get_mctrl() and ajust some bits in termios cflag.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/serial_txx9.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index b8f91e018b21..0930e2a85514 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | 39 | ||
40 | static char *serial_version = "1.09"; | 40 | static char *serial_version = "1.10"; |
41 | static char *serial_name = "TX39/49 Serial driver"; | 41 | static char *serial_name = "TX39/49 Serial driver"; |
42 | 42 | ||
43 | #define PASS_LIMIT 256 | 43 | #define PASS_LIMIT 256 |
@@ -436,8 +436,10 @@ static unsigned int serial_txx9_get_mctrl(struct uart_port *port) | |||
436 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; | 436 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; |
437 | unsigned int ret; | 437 | unsigned int ret; |
438 | 438 | ||
439 | ret = ((sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS) | 439 | /* no modem control lines */ |
440 | | ((sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS); | 440 | ret = TIOCM_CAR | TIOCM_DSR; |
441 | ret |= (sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS; | ||
442 | ret |= (sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS; | ||
441 | 443 | ||
442 | return ret; | 444 | return ret; |
443 | } | 445 | } |
@@ -557,6 +559,12 @@ serial_txx9_set_termios(struct uart_port *port, struct ktermios *termios, | |||
557 | unsigned long flags; | 559 | unsigned long flags; |
558 | unsigned int baud, quot; | 560 | unsigned int baud, quot; |
559 | 561 | ||
562 | /* | ||
563 | * We don't support modem control lines. | ||
564 | */ | ||
565 | termios->c_cflag &= ~(HUPCL | CMSPAR); | ||
566 | termios->c_cflag |= CLOCAL; | ||
567 | |||
560 | cval = sio_in(up, TXX9_SILCR); | 568 | cval = sio_in(up, TXX9_SILCR); |
561 | /* byte size and parity */ | 569 | /* byte size and parity */ |
562 | cval &= ~TXX9_SILCR_UMODE_MASK; | 570 | cval &= ~TXX9_SILCR_UMODE_MASK; |