From: Sourav Poddar <sourav.poddar@ti.com>
To: <broonie@kernel.org>, <spi-devel-general@lists.sourceforge.net>,
<grant.likely@linaro.org>
Cc: <balbi@ti.com>, <rnayak@ti.com>, <linux-omap@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Sourav Poddar <sourav.poddar@ti.com>
Subject: [RFC/PATCH 3/3] driver: spi: Add quad spi read support
Date: Mon, 8 Jul 2013 19:13:00 +0530 [thread overview]
Message-ID: <1373290980-17883-4-git-send-email-sourav.poddar@ti.com> (raw)
In-Reply-To: <1373290980-17883-1-git-send-email-sourav.poddar@ti.com>
Since, qspi controller uses quad read.
Configuring the command register, if the transfer of data needs
quad lines.
This patch has been done on top of the following patch[1], which is still
under review/comments.
This patch will also go changes, as the parent patch[1] does.
[1]: http://comments.gmane.org/gmane.linux.kernel.spi.devel/14047
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
---
drivers/spi/spi-ti-qspi.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c
index 430de9c..307cbed 100644
--- a/drivers/spi/spi-ti-qspi.c
+++ b/drivers/spi/spi-ti-qspi.c
@@ -258,8 +258,12 @@ static int qspi_read_msg(struct dra7xxx_qspi *qspi, struct spi_transfer *t)
qspi->cmd | QSPI_RD_SNGL, qspi->dc);
dra7xxx_writel(qspi, QSPI_WC_INT_EN, QSPI_INTR_ENABLE_SET_REG);
dra7xxx_writel(qspi, qspi->dc, QSPI_SPI_DC_REG);
- dra7xxx_writel(qspi, qspi->cmd | QSPI_RD_SNGL,
- QSPI_SPI_CMD_REG);
+ if (t->bitwidth == SPI_BITWIDTH_QUAD)
+ dra7xxx_writel(qspi, qspi->cmd | QSPI_RD_QUAD,
+ QSPI_SPI_CMD_REG);
+ else
+ dra7xxx_writel(qspi, qspi->cmd | QSPI_RD_SNGL,
+ QSPI_SPI_CMD_REG);
wait_for_completion(&qspi->word_complete);
*rxbuf++ = dra7xxx_readl_data(qspi, QSPI_SPI_DATA_REG, wlen);
dev_dbg(qspi->dev, "rx done, read %02x\n", *(rxbuf-1));
--
1.7.1
next prev parent reply other threads:[~2013-07-08 13:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 13:42 [PATCH 0/3] spi changes and ti quad spi controller Sourav Poddar
2013-07-08 13:42 ` [RFC/PATCH 1/3] driver: spi: Modify core to compute the message length Sourav Poddar
2013-07-08 15:02 ` Mark Brown
2013-07-08 13:42 ` [PATCHv3 2/3] drivers: spi: Add qspi flash controller Sourav Poddar
2013-07-08 14:32 ` Felipe Balbi
2013-07-09 7:29 ` Sourav Poddar
2013-07-11 9:12 ` Sourav Poddar
2013-07-08 20:33 ` Nishanth Menon
2013-07-09 6:51 ` Felipe Balbi
2013-07-09 10:05 ` Mark Brown
2013-07-09 12:32 ` Nishanth Menon
2013-07-09 12:50 ` Nishanth Menon
2013-07-09 14:40 ` Mark Brown
2013-07-09 14:53 ` Nishanth Menon
2013-07-09 7:20 ` Sourav Poddar
2013-07-08 13:43 ` Sourav Poddar [this message]
2013-07-08 14:36 ` [RFC/PATCH 3/3] driver: spi: Add quad spi read support Felipe Balbi
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=1373290980-17883-4-git-send-email-sourav.poddar@ti.com \
--to=sourav.poddar@ti.com \
--cc=balbi@ti.com \
--cc=broonie@kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rnayak@ti.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®