From: Mark Brown <broonie@kernel.org>
To: Vignesh R <vigneshr@ti.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org
Subject: Re: [PATCH] spi: ti-qspi: use 128 bit transfer mode for writing to flash
Date: Thu, 20 Aug 2015 10:55:14 -0700 [thread overview]
Message-ID: <20150820175514.GG12027@sirena.org.uk> (raw)
In-Reply-To: <1440066659-5356-1-git-send-email-vigneshr@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-08-20 17:55 UTC|newest]
Thread overview: 3+ 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 [this message]
2015-08-25 6:54 ` Vignesh R
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=20150820175514.GG12027@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@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