summaryrefslogtreecommitdiff
path: root/drivers/clk/mxs/clk-ssp.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-04-25 17:34:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-26 13:28:58 +0200
commitb54f7a922d334014071ddaea313a045781024f4d (patch)
tree67d8a4326ad0dd7613c1933557b7bc429cc13dfc /drivers/clk/mxs/clk-ssp.c
parente8ffbb71f783f577b24c25bd4dd1c7119d344924 (diff)
downloadlwn-b54f7a922d334014071ddaea313a045781024f4d.tar.gz
lwn-b54f7a922d334014071ddaea313a045781024f4d.zip
serial: 8250: Handle UART without interrupt on TEMT
Add UART_CAP_NOTEMT for UARTs that lack interrupt on TEMT but want to use em485. Em485 framework needs to ensure not only FIFO is empty but also that tx shift register is empty. This approach uses Uwe Kleine-König's suggestion on simply using/incrementing stop_tx timer rather than adding another timer. When UART_CAP_NOTEMT is set and THRE is present w/o TEMT, stop tx timer is reused to wait for the emptying of the shift register. This change does not add the UART_CAP_NOTEMT define as it already exist but is currently no-op. See 7a107b2c6b81 (Revert "serial: 8250: Handle UART without interrupt on TEMT using em485") for further details. Vicente Bergas reported that RTS is deasserted roughly one bit too early losing stop bit tx. To address this problem, stop_delay now accounts for one extra bit using rough formula /7 (assumes worst-case of 2+5 bits). I suspect this glitch had to do with when THRE is getting asserted. If FIFO is emptied already during the tx of the stop bit, perhaps it leads to HW asserting THRE early for the normal frame time formula to work accurately. Suggested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Eric Tremblay <etremblay@distech-controls.com> Tested-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220425143410.12703-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clk/mxs/clk-ssp.c')
0 files changed, 0 insertions, 0 deletions