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

Commit a29a3d57 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "serial: msm_geni_serial: Log CTS and RX IO line status"

parents 98b3301e 8e628756
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -473,6 +473,7 @@ static void wait_for_transfers_inflight(struct uart_port *uport)
	int iter = 0;
	struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
	unsigned int geni_status;
	bool CTS, RX;

	geni_status = geni_read_reg_nolog(uport->membase, SE_GENI_STATUS);
	/* Possible stop rx is called before this. */
@@ -496,10 +497,12 @@ static void wait_for_transfers_inflight(struct uart_port *uport)
							SE_GENI_RX_FIFO_STATUS);
		u32 rx_dma =
			geni_read_reg_nolog(uport->membase, SE_DMA_RX_LEN_IN);
		CTS = geni_ios & 0x2; // b[1] = UART CTS <- Peer RFR
		RX = geni_ios & 0x1;  // b[0] = UART RX <- Peer TX

		IPC_LOG_MSG(port->ipc_log_misc,
			"%s IOS 0x%x geni status 0x%x rx: fifo 0x%x dma 0x%x\n",
		__func__, geni_ios, geni_status, rx_fifo_status, rx_dma);
		"%s: geni=0x%x rx_fifo=0x%x rx_dma=0x%x, CTS_IO=%d, RX_IO=%d\n",
		 __func__, geni_status, rx_fifo_status, rx_dma, CTS, RX);
	}
}

@@ -1748,7 +1751,7 @@ static int msm_geni_serial_handle_dma_tx(struct uart_port *uport)
		 */
		if (!uart_console(uport)) {
			IPC_LOG_MSG(msm_port->ipc_log_misc,
				"%s.Power Off.\n", __func__);
				"%s.Tx sent out, Power off\n", __func__);
			msm_geni_serial_power_off(uport);
		}
		uart_write_wakeup(uport);