commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=ac314fb0e40fce1e53840043ba60c2462bec7bff
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/2012R1

This reverts commit dc2797b88d7edbc56bbd1d1f4ed6bde5ac06c45f.

Signed-off-by: Sonic Zhang <[email protected]>
---
 drivers/tty/serial/bfin_uart.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index cb48513..38b5541 100644
--- a/drivers/tty/serial/bfin_uart.c
+++ b/drivers/tty/serial/bfin_uart.c
@@ -760,9 +760,6 @@ static void bfin_serial_shutdown(struct uart_port *port)
 {
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 
-	UART_SET_IER(uart, 0);
-	UART_PUT_GCTL(uart, 0);
-
 #ifdef CONFIG_SERIAL_BFIN_DMA
 	disable_dma(uart->tx_dma_channel);
 	free_dma(uart->tx_dma_channel);
@@ -808,7 +805,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
 	unsigned long flags;
 	unsigned int baud, quot;
-	unsigned int val, lcr = 0;
+	unsigned int val, ier, lcr = 0;
 
 	switch (termios->c_cflag & CSIZE) {
 	case CS8:
@@ -879,9 +876,8 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);
 
 	/* Disable UART */
-	val = UART_GET_GCTL(uart);
-	val &= ~UCEN;
-	UART_PUT_GCTL(uart, val);
+	ier = UART_GET_IER(uart);
+	UART_DISABLE_INTS(uart);
 
 	/* Set DLAB in LCR to Access CLK */
 	UART_SET_DLAB(uart);
@@ -895,6 +891,8 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
 	UART_PUT_LCR(uart, (UART_GET_LCR(uart) & ~LCR_MASK) | lcr);
 
 	/* Enable UART */
+	UART_ENABLE_INTS(uart, ier);
+
 	val = UART_GET_GCTL(uart);
 	val |= UCEN;
 	UART_PUT_GCTL(uart, val);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to