From: Vignesh R <vigneshr@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] spi: ti-qspi: use 128 bit transfer mode for writing to flash
Date: Tue, 25 Aug 2015 12:24:53 +0530 [thread overview]
Message-ID: <55DC113D.6000406@ti.com> (raw)
In-Reply-To: <20150820175514.GG12027@sirena.org.uk>
On 08/20/2015 11:25 PM, Mark Brown wrote:
> On Thu, Aug 20, 2015 at 04:00:59PM +0530, Vignesh R wrote:
>
>> - writeb(*txbuf, qspi->base + QSPI_SPI_DATA_REG);
>> + if (count >= QSPI_WLEN_MAX_BYTES) {
>> + u32 *txp = (u32 *)txbuf;
>> +
>> + data = cpu_to_be32(*txp++);
>> + writel(data, qspi->base +
>> + QSPI_SPI_DATA_REG_3);
>> + data = cpu_to_be32(*txp++);
>> + writel(data, qspi->base +
>> + QSPI_SPI_DATA_REG_2);
>> + data = cpu_to_be32(*txp++);
>> + writel(data, qspi->base +
>> + QSPI_SPI_DATA_REG_1);
>> + data = cpu_to_be32(*txp++);
>> + writel(data, qspi->base +
>> + QSPI_SPI_DATA_REG);
>> + xfer_len = QSPI_WLEN_MAX_BYTES;
>> + 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);
>> + }
>
> It's a bit sad that this isn't able to do a Duff's device type thing and
> only kicks in for the full 128 bit FIFO size, it looks like it could do
> any number of words.
>
Yes, any number of bytes can be transfered (max 16 bytes).
I will try to work on your suggestion. Thanks!
--
Regards
Vignesh
next prev parent reply other threads:[~2015-08-25 6:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 10:30 [PATCH] spi: ti-qspi: use 128 bit transfer mode for writing to flash Vignesh R
2015-08-20 17:55 ` Mark Brown
2015-08-25 6:54 ` Vignesh R [this message]
[not found] ` <1440066659-5356-1-git-send-email-vigneshr-l0cyMroinI0@public.gmane.org>
2015-08-20 18:34 ` Applied "spi: ti-qspi: use 128 bit transfer mode where possible" to the spi tree Mark Brown
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=55DC113D.6000406@ti.com \
--to=vigneshr@ti.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).