diff options
Diffstat (limited to 'drivers/serial/atmel_serial.c')
-rw-r--r-- | drivers/serial/atmel_serial.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 6aeef22bd203..c17fcd6085f3 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -956,6 +956,20 @@ static void atmel_shutdown(struct uart_port *port) | |||
956 | } | 956 | } |
957 | 957 | ||
958 | /* | 958 | /* |
959 | * Flush any TX data submitted for DMA. Called when the TX circular | ||
960 | * buffer is reset. | ||
961 | */ | ||
962 | static void atmel_flush_buffer(struct uart_port *port) | ||
963 | { | ||
964 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); | ||
965 | |||
966 | if (atmel_use_dma_tx(port)) { | ||
967 | UART_PUT_TCR(port, 0); | ||
968 | atmel_port->pdc_tx.ofs = 0; | ||
969 | } | ||
970 | } | ||
971 | |||
972 | /* | ||
959 | * Power / Clock management. | 973 | * Power / Clock management. |
960 | */ | 974 | */ |
961 | static void atmel_serial_pm(struct uart_port *port, unsigned int state, | 975 | static void atmel_serial_pm(struct uart_port *port, unsigned int state, |
@@ -1189,6 +1203,7 @@ static struct uart_ops atmel_pops = { | |||
1189 | .break_ctl = atmel_break_ctl, | 1203 | .break_ctl = atmel_break_ctl, |
1190 | .startup = atmel_startup, | 1204 | .startup = atmel_startup, |
1191 | .shutdown = atmel_shutdown, | 1205 | .shutdown = atmel_shutdown, |
1206 | .flush_buffer = atmel_flush_buffer, | ||
1192 | .set_termios = atmel_set_termios, | 1207 | .set_termios = atmel_set_termios, |
1193 | .type = atmel_type, | 1208 | .type = atmel_type, |
1194 | .release_port = atmel_release_port, | 1209 | .release_port = atmel_release_port, |