linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: spi-ti-qspi: clear wlen field while setting word length.
@ 2016-07-09 20:05 Prahlad V
       [not found] ` <1468094753-8327-1-git-send-email-prahlad.eee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Prahlad V @ 2016-07-09 20:05 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, vigneshr-l0cyMroinI0,
	Prahlad V

When a word length of 1 byte is selected and writing data of length
more than QSPI_WLEN_MAX_BYTES, first MAX_BYTES will be transfered
and remaining will be transfered byte by byte. In that case wlen
field should be cleared before setting.

Signed-off-by: Prahlad V <prahlad.eee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/spi/spi-ti-qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 29ea8d2..6c61f54 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -276,9 +276,9 @@ static int qspi_write_msg(struct ti_qspi *qspi, struct spi_transfer *t,
 				cmd |= QSPI_WLEN(QSPI_WLEN_MAX_BITS);
 			} else {
 				writeb(*txbuf, qspi->base + QSPI_SPI_DATA_REG);
-				cmd = qspi->cmd | QSPI_WR_SNGL;
 				xfer_len = wlen;
-				cmd |= QSPI_WLEN(wlen);
+				cmd = ((qspi->cmd & ~QSPI_WLEN_MASK) |
+					     QSPI_WLEN(wlen));
 			}
 			break;
 		case 2:
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-11 17:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-09 20:05 [PATCH] spi: spi-ti-qspi: clear wlen field while setting word length Prahlad V
     [not found] ` <1468094753-8327-1-git-send-email-prahlad.eee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-11  5:07   ` Vignesh R
2016-07-11  8:04     ` prahlad venkata
2016-07-11  8:44       ` Vignesh R
     [not found]         ` <57835C62.7030704-l0cyMroinI0@public.gmane.org>
2016-07-11  9:06           ` prahlad venkata
2016-07-11  9:09             ` prahlad venkata
     [not found]               ` <CAFbo-qW1pK5RJOCY0b0Gz7JR+9170sjiZb90UEvqySLheZst3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-11  9:15                 ` Vignesh R
2016-07-11  9:19                   ` prahlad venkata
2016-07-11 10:23                     ` Vignesh R
2016-07-11 17:08                       ` prahlad venkata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).