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

Commit 877c5ab2 authored by Venkata Manasa Kakarla's avatar Venkata Manasa Kakarla Committed by Gerrit - the friendly Code Review server
Browse files

serial:msm_geni_serial: Handling the cts counter in uart driver



Handle the CTS counter whenever the change in CTS interrupt occur.
Using the M_IO_DATA_ASSERT bit in interrupt register, this will get
set when CTS is high.

Change-Id: I43c629f4d026af4a7e82d0d6d01b826259b0b1b5
Signed-off-by: default avatarVenkata Manasa Kakarla <venkka@codeaurora.org>
parent 6cb02c40
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -123,7 +123,9 @@
#define DATA_BYTES_PER_LINE	(32)
#define DATA_BYTES_PER_LINE	(32)


#define M_IRQ_BITS		(M_RX_FIFO_WATERMARK_EN | M_RX_FIFO_LAST_EN |\
#define M_IRQ_BITS		(M_RX_FIFO_WATERMARK_EN | M_RX_FIFO_LAST_EN |\
				M_CMD_CANCEL_EN | M_CMD_ABORT_EN)
				M_CMD_CANCEL_EN | M_CMD_ABORT_EN |\
				M_IO_DATA_ASSERT_EN | M_IO_DATA_DEASSERT_EN)

#define S_IRQ_BITS		(S_RX_FIFO_WATERMARK_EN | S_RX_FIFO_LAST_EN |\
#define S_IRQ_BITS		(S_RX_FIFO_WATERMARK_EN | S_RX_FIFO_LAST_EN |\
				S_CMD_CANCEL_EN | S_CMD_ABORT_EN)
				S_CMD_CANCEL_EN | S_CMD_ABORT_EN)
#define DMA_TX_IRQ_BITS		(TX_RESET_DONE | TX_DMA_DONE |\
#define DMA_TX_IRQ_BITS		(TX_RESET_DONE | TX_DMA_DONE |\
@@ -1908,6 +1910,13 @@ static void msm_geni_serial_handle_isr(struct uart_port *uport,
		goto exit_geni_serial_isr;
		goto exit_geni_serial_isr;
	}
	}


	if (m_irq_status & (M_IO_DATA_ASSERT_EN | M_IO_DATA_DEASSERT_EN)) {
		uport->icount.cts++;
		IPC_LOG_MSG(msm_port->ipc_log_misc,
			"%s. cts counter:%d\n", __func__,
				uport->icount.cts);
	}

	if (s_irq_status & S_RX_FIFO_WR_ERR_EN) {
	if (s_irq_status & S_RX_FIFO_WR_ERR_EN) {
		uport->icount.overrun++;
		uport->icount.overrun++;
		tty_insert_flip_char(tport, 0, TTY_OVERRUN);
		tty_insert_flip_char(tport, 0, TTY_OVERRUN);