From: Prahlad V <prahlad.eee@gmail.com>
To: broonie@kernel.org
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
vigneshr@ti.com, Prahlad V <prahlad.eee@gmail.com>
Subject: [PATCH] spi: spi-ti-qspi: clear wlen field while setting word length.
Date: Sun, 10 Jul 2016 01:35:53 +0530 [thread overview]
Message-ID: <1468094753-8327-1-git-send-email-prahlad.eee@gmail.com> (raw)
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@gmail.com>
---
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
next reply other threads:[~2016-07-09 20:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-09 20:05 Prahlad V [this message]
2016-07-11 5:07 ` [PATCH] spi: spi-ti-qspi: clear wlen field while setting word length Vignesh R
2016-07-11 8:04 ` prahlad venkata
2016-07-11 8:44 ` Vignesh R
2016-07-11 9:06 ` prahlad venkata
2016-07-11 9:09 ` prahlad venkata
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468094753-8327-1-git-send-email-prahlad.eee@gmail.com \
--to=prahlad.eee@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox