[U-Boot] [PATCH 2/2] spi: ti_qspi: Fix SPI_3WIRE checking using mode

Jagan Teki jteki at openedev.com
Thu Dec 3 18:12:19 CET 2015


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 at ti.com>
Cc: Simon Glass <sjg at chromium.org>
Signed-off-by: Jagan Teki <jteki at openedev.com>
---
 drivers/spi/ti_qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index 646dd89..5747ed1 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -293,7 +293,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
 	qslave->cmd = 0;
 	qslave->cmd |= QSPI_WLEN(8);
 	qslave->cmd |= QSPI_EN_CS(slave->cs);
-	if (flags & SPI_3WIRE)
+	if (qslave->mode & SPI_3WIRE)
 		qslave->cmd |= QSPI_3_PIN;
 	qslave->cmd |= 0xfff;
 
-- 
1.9.1



More information about the U-Boot mailing list