From: Ira Snyder <iws@ovro.caltech.edu>
To: linux-kernel@vger.kernel.org
Cc: Li Yang <leoli@freescale.com>,
Zhang Wei <wei.zhang@freescale.com>,
Dan Williams <dan.j.williams@intel.com>,
linuxppc-dev@ozlabs.org
Subject: [PATCH] fsldma: use PCI Read Multiple command
Date: Fri, 24 Apr 2009 11:35:18 -0700 [thread overview]
Message-ID: <20090424183517.GB23140@ovro.caltech.edu> (raw)
By default, the Freescale 83xx DMA controller uses the PCI Read Line
command when reading data over the PCI bus. Setting the controller to use
the PCI Read Multiple command instead allows the controller to read much
larger bursts of data, which provides a drastic speed increase.
The slowdown due to using PCI Read Line was only observed when a PCI-to-PCI
bridge was between the devices trying to communicate.
A simple test driver showed an increase from 4MB/sec to 116MB/sec when
performing DMA over the PCI bus. Using DMA to transfer between blocks of
local SDRAM showed no change in performance with this patch. The dmatest
driver was also used to verify the correctness of the transfers, and showed
no errors.
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
---
drivers/dma/fsldma.c | 5 +++--
drivers/dma/fsldma.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index da8a8ed..638d00e 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -49,9 +49,10 @@ static void dma_init(struct fsl_dma_chan *fsl_chan)
case FSL_DMA_IP_83XX:
/* Set the channel to below modes:
* EOTIE - End-of-transfer interrupt enable
+ * PRC_RM - PCI read multiple
*/
- DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, FSL_DMA_MR_EOTIE,
- 32);
+ DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr, FSL_DMA_MR_EOTIE
+ | FSL_DMA_MR_PRC_RM, 32);
break;
}
diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
index 4f21a51..dc7f268 100644
--- a/drivers/dma/fsldma.h
+++ b/drivers/dma/fsldma.h
@@ -38,6 +38,7 @@
/* Special MR definition for MPC8349 */
#define FSL_DMA_MR_EOTIE 0x00000080
+#define FSL_DMA_MR_PRC_RM 0x00000800
#define FSL_DMA_SR_CH 0x00000020
#define FSL_DMA_SR_PE 0x00000010
--
1.5.4.3
next reply other threads:[~2009-04-24 18:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 18:35 Ira Snyder [this message]
2009-04-27 7:48 ` Li Yang
2009-04-27 9:09 ` Liu Dave-R63238
2009-04-27 10:16 ` Li Yang
2009-04-27 14:31 ` Timur Tabi
2009-04-27 19:34 ` David Hawkins
2009-04-27 19:40 ` Timur Tabi
2009-04-27 19:48 ` David Hawkins
2009-04-27 19:54 ` Kumar Gala
2009-04-27 20:00 ` David Hawkins
2009-04-27 20:01 ` David Hawkins
2009-04-28 2:06 ` Liu Dave-R63238
2009-04-27 20:02 ` Kumar Gala
2009-04-27 20:12 ` David Hawkins
2009-04-27 20:04 ` Timur Tabi
2009-04-27 20:47 ` Scott Wood
2009-04-27 20:49 ` Timur Tabi
2009-04-27 20:22 ` David Hawkins
2009-04-27 20:26 ` Timur Tabi
2009-04-27 20:41 ` David Hawkins
2009-04-27 20:42 ` Timur Tabi
2009-04-27 20:44 ` David Hawkins
2009-04-27 20:42 ` Ira Snyder
2009-04-27 20:47 ` Timur Tabi
2009-04-27 20:49 ` Dan Williams
2009-06-11 2:45 ` Kumar Gala
2009-06-11 15:17 ` Ira Snyder
2009-06-12 9:23 ` Li Yang
2009-06-12 15:03 ` Kumar Gala
2009-06-12 17:38 ` Dan Williams
2009-06-12 18:01 ` Kumar Gala
2009-04-28 1:48 ` Liu Dave-R63238
2009-04-28 2:08 ` David Hawkins
2009-04-28 1:31 ` Liu Dave-R63238
2009-04-28 1:36 ` David Hawkins
2009-04-28 13:43 ` Timur Tabi
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=20090424183517.GB23140@ovro.caltech.edu \
--to=iws@ovro.caltech.edu \
--cc=dan.j.williams@intel.com \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=wei.zhang@freescale.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
all inboxes | Powered by JetHome®