Commit f3c677b997757326e1f29d33060719a6a5091950

Authored by Forrest Shi
Committed by Dan Williams
1 parent c989a7fc13

fsldma: fix issue of slow dma

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 <b29237@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Showing 2 changed files with 12 additions and 3 deletions Side-by-side Diff

drivers/dma/fsldma.c
... ... @@ -50,9 +50,11 @@
50 50 * EIE - Error interrupt enable
51 51 * EOSIE - End of segments interrupt enable (basic mode)
52 52 * EOLNIE - End of links interrupt enable
  53 + * BWC - Bandwidth sharing among channels
53 54 */
54   - DMA_OUT(chan, &chan->regs->mr, FSL_DMA_MR_EIE
55   - | FSL_DMA_MR_EOLNIE | FSL_DMA_MR_EOSIE, 32);
  55 + DMA_OUT(chan, &chan->regs->mr, FSL_DMA_MR_BWC
  56 + | FSL_DMA_MR_EIE | FSL_DMA_MR_EOLNIE
  57 + | FSL_DMA_MR_EOSIE, 32);
56 58 break;
57 59 case FSL_DMA_IP_83XX:
58 60 /* Set the channel to below modes:
drivers/dma/fsldma.h
1 1 /*
2   - * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
  2 + * Copyright (C) 2007-2010 Freescale Semiconductor, Inc. All rights reserved.
3 3 *
4 4 * Author:
5 5 * Zhang Wei <wei.zhang@freescale.com>, Jul 2007
... ... @@ -35,6 +35,13 @@
35 35 #define FSL_DMA_MR_EMS_EN 0x00040000
36 36 #define FSL_DMA_MR_DAHE 0x00002000
37 37 #define FSL_DMA_MR_SAHE 0x00001000
  38 +
  39 +/*
  40 + * Bandwidth/pause control determines how many bytes a given
  41 + * channel is allowed to transfer before the DMA engine pauses
  42 + * the current channel and switches to the next channel
  43 + */
  44 +#define FSL_DMA_MR_BWC 0x08000000
38 45  
39 46 /* Special MR definition for MPC8349 */
40 47 #define FSL_DMA_MR_EOTIE 0x00000080