diff options
Diffstat (limited to 'drivers/serial/atmel_serial.c')
-rw-r--r-- | drivers/serial/atmel_serial.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index b3497d7e5354..338b15c0a548 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1104,11 +1104,13 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, | |||
1104 | /* update the per-port timeout */ | 1104 | /* update the per-port timeout */ |
1105 | uart_update_timeout(port, termios->c_cflag, baud); | 1105 | uart_update_timeout(port, termios->c_cflag, baud); |
1106 | 1106 | ||
1107 | /* save/disable interrupts and drain transmitter */ | 1107 | /* |
1108 | * save/disable interrupts. The tty layer will ensure that the | ||
1109 | * transmitter is empty if requested by the caller, so there's | ||
1110 | * no need to wait for it here. | ||
1111 | */ | ||
1108 | imr = UART_GET_IMR(port); | 1112 | imr = UART_GET_IMR(port); |
1109 | UART_PUT_IDR(port, -1); | 1113 | UART_PUT_IDR(port, -1); |
1110 | while (!(UART_GET_CSR(port) & ATMEL_US_TXEMPTY)) | ||
1111 | cpu_relax(); | ||
1112 | 1114 | ||
1113 | /* disable receiver and transmitter */ | 1115 | /* disable receiver and transmitter */ |
1114 | UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS); | 1116 | UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS); |