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

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

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

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


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


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


@@ -1766,7 +1769,7 @@ static int msm_geni_serial_handle_dma_tx(struct uart_port *uport)
		 */
		 */
		if (!uart_console(uport)) {
		if (!uart_console(uport)) {
			IPC_LOG_MSG(msm_port->ipc_log_misc,
			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);
			msm_geni_serial_power_off(uport);
		}
		}
		uart_write_wakeup(uport);
		uart_write_wakeup(uport);