From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] mxs/spi: Decrement the DMA/PIO border
Date: Tue, 4 Sep 2012 04:40:17 +0200 [thread overview]
Message-ID: <1346726418-2856-4-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1346726418-2856-1-git-send-email-marex@denx.de>
This driver checks the length of transfer to be made and based
on this information, either chooses to transfer data via DMA or
PIO. Decrement this border further to gain better performace eg.
during SPI flash writes.
Empiric measurement shows that this gives extra 3kB/s write speed
with a M25P80 flash clocked at 40MHz.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
drivers/spi/spi-mxs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 282bdd7..6650ded 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -445,7 +445,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
* DMA only: 2.164808 seconds, 473.0KB/s
* Combined: 1.676276 seconds, 610.9KB/s
*/
- if (t->len <= 256) {
+ if (t->len < 32) {
writel(BM_SSP_CTRL1_DMA_ENABLE,
ssp->base + HW_SSP_CTRL1(ssp) +
STMP_OFFSET_REG_CLR);
--
1.7.10.4
next prev parent reply other threads:[~2012-09-04 2:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 2:40 [PATCH 0/4] mxs/spi: Fixes and improvements Marek Vasut
2012-09-04 2:40 ` [PATCH 1/4] mxs/spi: Fix issues when doing long continuous transfer Marek Vasut
2012-09-04 2:40 ` [PATCH 2/4] mxs/spi: Increment the transfer length only if transfer succeeded Marek Vasut
2012-09-04 2:40 ` Marek Vasut [this message]
2012-09-04 2:40 ` [PATCH 4/4] mxs/spi: Rework the mxs_ssp_timeout to be more readable Marek Vasut
2012-09-05 23:42 ` [PATCH 0/4] mxs/spi: Fixes and improvements Mark Brown
2012-09-06 2:05 ` Marek Vasut
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=1346726418-2856-4-git-send-email-marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.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).