mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
serial: msm_geni_serial: Log CTS and RX IO line status
This change adds the status of UART input lines namely CTS and RX. These two lines are driven from peer device hence it helps in debug to confirm peer device status. This is requested by BT HOST driver to help understand logs clearly. Change-Id: I892961a5889aea1f46fed1fbde2c924844bc3946 Signed-off-by: Mukesh Kumar Savaliya <[email protected]>
This commit is contained in:
parent
d8534164bb
commit
8e62875674
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1758,7 +1761,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue