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

Commit 70e2e976 authored by Sourav Poddar's avatar Sourav Poddar Committed by Mark Brown
Browse files

spi/qspi: Add dual/quad spi read support

Support for multiple lines in SPI framework has been picked[1].
[1]: http://comments.gmane.org/gmane.linux.kernel.spi.devel/14420



Hence, adapting ti qspi driver to support multiple data lines for read.

Signed-off-by: default avatarSourav Poddar <sourav.poddar@ti.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 21e34a33
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -267,7 +267,18 @@ static int qspi_read_msg(struct ti_qspi *qspi, struct spi_transfer *t)
	u8 *rxbuf;

	rxbuf = t->rx_buf;
	cmd = qspi->cmd | QSPI_RD_SNGL;
	cmd = qspi->cmd;
	switch (t->rx_nbits) {
	case SPI_NBITS_DUAL:
		cmd |= QSPI_RD_DUAL;
		break;
	case SPI_NBITS_QUAD:
		cmd |= QSPI_RD_QUAD;
		break;
	default:
		cmd |= QSPI_RD_SNGL;
		break;
	}
	count = t->len;
	wlen = t->bits_per_word;