Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 095ed32d authored by Mitul Golani's avatar Mitul Golani Committed by Gerrit - the friendly Code Review server
Browse files

serial: msm_serial_hs: Align to HW assisted flow control support



If client enables HW AUTOCTS mode then set UPSTAT_AUTOCTS,otherwise
serial core disables TX fully at the framework layer and
no communication happens.

Signed-off-by: default avatarMitul Golani <mgolani@codeaurora.org>
Change-Id: I13d6048fc2aeacd2f0078fc38f43e07cfd5a5850
parent 4efd54ad
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 * MSM 7k High speed uart driver
 *
 * Copyright (c) 2008 Google Inc.
 * Copyright (c) 2007-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2007-2019, The Linux Foundation. All rights reserved.
 * Modified: Nick Pelly <npelly@google.com>
 *
 * All source code in this file is licensed under the following license
@@ -1185,6 +1185,7 @@ static void msm_hs_set_termios(struct uart_port *uport,
		data |= EIGHT_BPC;
		break;
	}
	uport->status  &= ~(UPSTAT_AUTOCTS);
	/* stop bits */
	if (c_cflag & CSTOPB) {
		data |= STOP_BIT_TWO;
@@ -1229,6 +1230,7 @@ static void msm_hs_set_termios(struct uart_port *uport,
	if (c_cflag & CRTSCTS) {
		data |= UARTDM_MR1_CTS_CTL_BMSK;
		data |= UARTDM_MR1_RX_RDY_CTL_BMSK;
		uport->status |= UPSTAT_AUTOCTS;
		msm_uport->flow_control = true;
	}
	msm_hs_write(uport, UART_DM_MR1, data);