spi: ti_qspi: Fix SPI_3WIRE checking using mode

SPI_3WIRE is spi mode not spi flags, so this patch fixed
the spi-3wire checking throgh mode instead of flags.

Cc: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>
This commit is contained in:
Jagan Teki 2015-12-03 22:25:20 +05:30
parent 379b49d82e
commit cd337da21e

View file

@ -293,7 +293,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
qslave->cmd = 0; qslave->cmd = 0;
qslave->cmd |= QSPI_WLEN(8); qslave->cmd |= QSPI_WLEN(8);
qslave->cmd |= QSPI_EN_CS(slave->cs); qslave->cmd |= QSPI_EN_CS(slave->cs);
if (flags & SPI_3WIRE) if (qslave->mode & SPI_3WIRE)
qslave->cmd |= QSPI_3_PIN; qslave->cmd |= QSPI_3_PIN;
qslave->cmd |= 0xfff; qslave->cmd |= 0xfff;