summaryrefslogtreecommitdiff
path: root/arch/blackfin/lib
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2012-12-11 16:51:23 +0800
committerSonic Zhang <sonic.zhang@analog.com>2013-05-13 15:47:24 +0800
commitc4239b5341b6eb8126072c853d1eb32e86face7f (patch)
treef09deb7aec0126e8f754ffe804cacd402661644e /arch/blackfin/lib
parent1cd9158eb4e5961e225a870195ccc8eed5d90adc (diff)
blackfin: limit the max memory dma peripheral transfer size to 4 bytes.
Othersize, the bf609 memory dma halts after being enabled. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Diffstat (limited to 'arch/blackfin/lib')
-rw-r--r--arch/blackfin/lib/string.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/blackfin/lib/string.c b/arch/blackfin/lib/string.c
index 44d8c6d906..5b7ac0b91a 100644
--- a/arch/blackfin/lib/string.c
+++ b/arch/blackfin/lib/string.c
@@ -128,10 +128,12 @@ static void dma_calc_size(unsigned long ldst, unsigned long lsrc, size_t count,
unsigned long limit;
#ifdef MSIZE
- limit = 6;
+ /* The max memory DMA memory transfer size is 32 bytes. */
+ limit = 5;
*dshift = MSIZE_P;
#else
- limit = 3;
+ /* The max memory DMA memory transfer size is 4 bytes. */
+ limit = 2;
*dshift = WDSIZE_P;
#endif
@@ -170,7 +172,8 @@ void dma_memcpy_nocache(void *dst, const void *src, size_t count)
mod = 1 << bpos;
#ifdef PSIZE
- dsize |= min(3, bpos) << PSIZE_P;
+ /* The max memory DMA peripheral transfer size is 4 bytes. */
+ dsize |= min(2, bpos) << PSIZE_P;
#endif
/* Copy sram functions from sdram to sram */