Home
last modified time | relevance | path

Searched hist:ea04f82a0c7f2739071cc9ac4a0ca57b3bddef7b (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/tty/serial/
H A Datmel_serial.cdiff ea04f82a0c7f2739071cc9ac4a0ca57b3bddef7b Thu Sep 28 04:46:27 CDT 2017 Romain Izard <romain.izard.pro@gmail.com> tty/serial: atmel: Prevent a warning on suspend

The atmel serial port driver reported the following warning on suspend:
atmel_usart f8020000.serial: ttyS1: Unable to drain transmitter

As the ATMEL_US_TXEMPTY status bit in ATMEL_US_CSR is always cleared
when the transmitter is disabled, we need to know the transmitter's
state to return the real fifo state. And as ATMEL_US_CR is write-only,
it is necessary to save the state of the transmitter in a local
variable, and update the variable when TXEN and TXDIS is written in
ATMEL_US_CR.

After those changes, atmel_tx_empty can return "empty" on suspend, the
warning in uart_suspend_port disappears, and suspending is 20ms shorter
for each enabled Atmel serial port.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Tested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>