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

Commit bd0ebf1e authored by Girish Mahadevan's avatar Girish Mahadevan Committed by Gerrit - the friendly Code Review server
Browse files

spi: spi_qsd: Don't connect/disconnect BAM pipe after every transfer



The driver currently makes a call to disconnect then reconnect the BAM
pipes after every transfer in a bid to flush the BAM pipes.
Do this only if the BAM transfer somehow failed, else it will incur
additional overhead per transfer.

Change-Id: I9bc3a367042320e5364cb34eae2df45fcb79cc70
Signed-off-by: default avatarGirish Mahadevan <girishm@codeaurora.org>
parent 48846223
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1521,12 +1521,13 @@ static int msm_spi_process_transfer(struct msm_spi *dd)
	msm_spi_udelay(dd->xfrs_delay_usec);

transfer_end:
	if (dd->mode == SPI_BAM_MODE)
	if ((dd->mode == SPI_BAM_MODE) && status)
		msm_spi_bam_flush(dd);
	msm_spi_dma_unmap_buffers(dd);
	dd->mode = SPI_MODE_NONE;

	msm_spi_set_state(dd, SPI_OP_STATE_RESET);
	if (!dd->cur_transfer->cs_change)
		writel_relaxed(spi_ioc & ~SPI_IO_C_MX_CS_MODE,
		       dd->base + SPI_IO_CONTROL);
	return status;