Re: [PATCH] fsldma: fix issue of slow dma

2010-12-13 Thread Dan Williams
On Thu, Dec 9, 2010 at 12:14 AM, Li Yang le...@freescale.com wrote:
 From: Forrest Shi b29...@freescale.com

 Fixed fsl dma slow issue by initializing dma mode register with
 bandwidth control. It boosts dma performance and should works
 with 85xx board.

 Signed-off-by: Forrest Shi b29...@freescale.com
 Signed-off-by: Li Yang le...@freescale.com

Applied.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] fsldma: fix issue of slow dma

2010-12-08 Thread Li Yang
From: Forrest Shi b29...@freescale.com

Fixed fsl dma slow issue by initializing dma mode register with
bandwidth control. It boosts dma performance and should works
with 85xx board.

Signed-off-by: Forrest Shi b29...@freescale.com
Signed-off-by: Li Yang le...@freescale.com
---
 drivers/dma/fsldma.c |6 --
 drivers/dma/fsldma.h |9 -
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 286c3ac..e5e172d 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -50,9 +50,11 @@ static void dma_init(struct fsldma_chan *chan)
 * EIE - Error interrupt enable
 * EOSIE - End of segments interrupt enable (basic mode)
 * EOLNIE - End of links interrupt enable
+* BWC - Bandwidth sharing among channels
 */
-   DMA_OUT(chan, chan-regs-mr, FSL_DMA_MR_EIE
-   | FSL_DMA_MR_EOLNIE | FSL_DMA_MR_EOSIE, 32);
+   DMA_OUT(chan, chan-regs-mr, FSL_DMA_MR_BWC
+   | FSL_DMA_MR_EIE | FSL_DMA_MR_EOLNIE
+   | FSL_DMA_MR_EOSIE, 32);
break;
case FSL_DMA_IP_83XX:
/* Set the channel to below modes:
diff --git a/drivers/dma/fsldma.h b/drivers/dma/fsldma.h
index cb4d6ff..ba9f403 100644
--- a/drivers/dma/fsldma.h
+++ b/drivers/dma/fsldma.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ * Copyright (C) 2007-2010 Freescale Semiconductor, Inc. All rights reserved.
  *
  * Author:
  *   Zhang Wei wei.zh...@freescale.com, Jul 2007
@@ -36,6 +36,13 @@
 #define FSL_DMA_MR_DAHE0x2000
 #define FSL_DMA_MR_SAHE0x1000
 
+/*
+ * Bandwidth/pause control determines how many bytes a given
+ * channel is allowed to transfer before the DMA engine pauses
+ * the current channel and switches to the next channel
+ */
+#define FSL_DMA_MR_BWC 0x0800
+
 /* Special MR definition for MPC8349 */
 #define FSL_DMA_MR_EOTIE   0x0080
 #define FSL_DMA_MR_PRC_RM  0x0800
-- 
1.6.6-rc1.GIT


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev