summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-10-06 10:08:20 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-11-04 13:29:33 +0100
commit18f360f865cffde44b112577fed1a6a0dd2740dc (patch)
tree6253fe3261bb0e4814e8d03ba350c76b3fdcda86 /drivers/tty
parentSERIAL: omap: don't read back LCR/MCR/EFR (diff)
downloadlinux-18f360f865cffde44b112577fed1a6a0dd2740dc.tar.xz
linux-18f360f865cffde44b112577fed1a6a0dd2740dc.zip
SERIAL: omap: simplify
We have the sequence: - LCR mode B - write EFR with ECB clear - LCR mode normal - if s/w flow - LCR mode B - write EFR with ECB clear ... - LCR mode B - write EFR with ECB clear - LCR mode normal This can be simplified to: - if s/w flow - LCR mode B - write EFR with ECB clear ... - LCR mode B - write EFR with ECB clear - LCR mode normal Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/omap-serial.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 6d588e20c648..fbce4c2e55cf 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -917,19 +917,11 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
/* Disable access to TCR/TLR */
serial_out(up, UART_MCR, up->mcr);
- serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
- serial_out(up, UART_EFR, up->efr);
- serial_out(up, UART_LCR, cval);
} else {
/* Disable AUTORTS and AUTOCTS */
up->efr &= ~(UART_EFR_CTS | UART_EFR_RTS);
-
- serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
- serial_out(up, UART_EFR, up->efr);
- serial_out(up, UART_LCR, cval);
}
- /* Software Flow Control Configuration */
if (up->port.flags & UPF_SOFT_FLOW) {
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
serial_out(up, UART_EFR, up->efr);
@@ -975,11 +967,12 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
serial_out(up, UART_TI752_TCR, OMAP_UART_TCR_TRIG);
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);
serial_out(up, UART_MCR, up->mcr);
- serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
- serial_out(up, UART_EFR, up->efr);
- serial_out(up, UART_LCR, up->lcr);
}
+ serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
+ serial_out(up, UART_EFR, up->efr);
+ serial_out(up, UART_LCR, up->lcr);
+
serial_omap_set_mctrl(&up->port, up->port.mctrl);
spin_unlock_irqrestore(&up->port.lock, flags);