提交 5f9a3e89 编写于 作者: A Aubrey Li 提交者: Linus Torvalds

Blackfin arch: dma_memcpy borken for > 64K

Signed-off-by: NAubrey Li <aubrey.li@analog.com>
Signed-off-by: NBryan Wu <bryan.wu@analog.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5079df99
...@@ -595,7 +595,7 @@ unsigned short get_dma_curr_ycount(unsigned int channel) ...@@ -595,7 +595,7 @@ unsigned short get_dma_curr_ycount(unsigned int channel)
} }
EXPORT_SYMBOL(get_dma_curr_ycount); 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 direction; /* 1 - address decrease, 0 - address increase */
int flag_align; /* 1 - address aligned, 0 - address unaligned */ int flag_align; /* 1 - address aligned, 0 - address unaligned */
...@@ -734,6 +734,21 @@ void *dma_memcpy(void *dest, const void *src, size_t size) ...@@ -734,6 +734,21 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
return dest; 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); EXPORT_SYMBOL(dma_memcpy);
void *safe_dma_memcpy(void *dest, const void *src, size_t size) void *safe_dma_memcpy(void *dest, const void *src, size_t size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册