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

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
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment