Commit 1ed436cd authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Greg Kroah-Hartman

tty: serial: qcom_geni_serial: Allow mctrl when flow control is disabled

[ Upstream commit e8a6ca80 ]

The geni set/get_mctrl() functions currently do nothing unless
hardware flow control is enabled. Remove this arbitrary limitation.
Suggested-by: default avatarJohan Hovold <johan@kernel.org>
Fixes: 8a8a66a1 ("tty: serial: qcom_geni_serial: Add support for flow control")
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8c5571b9
...@@ -221,7 +221,7 @@ static unsigned int qcom_geni_serial_get_mctrl(struct uart_port *uport) ...@@ -221,7 +221,7 @@ static unsigned int qcom_geni_serial_get_mctrl(struct uart_port *uport)
unsigned int mctrl = TIOCM_DSR | TIOCM_CAR; unsigned int mctrl = TIOCM_DSR | TIOCM_CAR;
u32 geni_ios; u32 geni_ios;
if (uart_console(uport) || !uart_cts_enabled(uport)) { if (uart_console(uport)) {
mctrl |= TIOCM_CTS; mctrl |= TIOCM_CTS;
} else { } else {
geni_ios = readl_relaxed(uport->membase + SE_GENI_IOS); geni_ios = readl_relaxed(uport->membase + SE_GENI_IOS);
...@@ -237,7 +237,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport, ...@@ -237,7 +237,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport,
{ {
u32 uart_manual_rfr = 0; u32 uart_manual_rfr = 0;
if (uart_console(uport) || !uart_cts_enabled(uport)) if (uart_console(uport))
return; return;
if (!(mctrl & TIOCM_RTS)) if (!(mctrl & TIOCM_RTS))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment