summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorAubrey Li2007-05-21 12:09:28 +0200
committerLinus Torvalds2007-05-21 18:50:22 +0200
commit5f9a3e899897201a49965cd9e1bb2570b3bde2b5 (patch)
tree27616f6c6e49f2bafe2681441576e491bfbce0e1 /arch/blackfin/kernel
parentBlackfin arch: document why we have to touch the UART peripheral in our boot ... (diff)
downloadkernel-qcow2-linux-5f9a3e899897201a49965cd9e1bb2570b3bde2b5.tar.gz
kernel-qcow2-linux-5f9a3e899897201a49965cd9e1bb2570b3bde2b5.tar.xz
kernel-qcow2-linux-5f9a3e899897201a49965cd9e1bb2570b3bde2b5.zip
Blackfin arch: dma_memcpy borken for > 64K
Signed-off-by: Aubrey Li <aubrey.li@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 1c344acfd487..0ccb0dc3f833 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -595,7 +595,7 @@ unsigned short get_dma_curr_ycount(unsigned int channel)
}
EXPORT_SYMBOL(get_dma_curr_ycount);
-void *dma_memcpy(void *dest, const void *src, size_t size)
+void *_dma_memcpy(void *dest, const void *src, size_t size)
{
int direction; /* 1 - address decrease, 0 - address increase */
int flag_align; /* 1 - address aligned, 0 - address unaligned */
@@ -734,6 +734,21 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
return dest;
}
+
+void *dma_memcpy(void *dest, const void *src, size_t size)
+{
+ size_t bulk;
+ size_t rest;
+ void * addr;
+
+ bulk = (size >> 16) << 16;
+ rest = size - bulk;
+ if (bulk)
+ _dma_memcpy(dest, src, bulk);
+ addr = _dma_memcpy(dest+bulk, src+bulk, rest);
+ return addr;
+}
+
EXPORT_SYMBOL(dma_memcpy);
void *safe_dma_memcpy(void *dest, const void *src, size_t size)