Skip to content

Commit

Permalink
SERIAL: omap: simplify (2)
Browse files Browse the repository at this point in the history
Simplify:
	- set ECB
	...
	- LCR mode A
	- clear TCRTLR
	- LCR mode B
	- clear ECB
	- set ECB and update other bits
	- LCR mode A
	- update XONANY

to:
	- set ECB
	...
	- LCR mode B
	- set ECB and update other bits
	- LCR mode A
	- update XONANY and clear TCRTLR

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Nov 4, 2012
1 parent c533e51 commit 2405464
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,11 +924,6 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
}

if (up->port.flags & UPF_SOFT_FLOW) {
/* 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);

/* clear SW control mode bits */
up->efr &= OMAP_UART_SW_CLR;

Expand All @@ -948,9 +943,6 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
if (termios->c_iflag & IXOFF)
up->efr |= OMAP_UART_SW_RX;

serial_out(up, UART_EFR, up->efr | UART_EFR_ECB);
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);

/*
* IXANY Flag:
* Enable any character to restart output.
Expand All @@ -962,7 +954,6 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
else
up->mcr &= ~UART_MCR_XONANY;
}

serial_out(up, UART_MCR, up->mcr);
serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);
serial_out(up, UART_EFR, up->efr);
Expand Down

0 comments on commit 2405464

Please sign in to comment.