diff options
author | Aubrey Li <aubrey.li@analog.com> | 2007-05-21 06:09:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-21 12:50:22 -0400 |
commit | 5f9a3e899897201a49965cd9e1bb2570b3bde2b5 (patch) | |
tree | 27616f6c6e49f2bafe2681441576e491bfbce0e1 /arch/blackfin/kernel/bfin_dma_5xx.c | |
parent | 5079df993c3ab45af10dc9a45b3b9e712fd56f23 (diff) |
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/bfin_dma_5xx.c')
-rw-r--r-- | arch/blackfin/kernel/bfin_dma_5xx.c | 17 |
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) | |||
595 | } | 595 | } |
596 | EXPORT_SYMBOL(get_dma_curr_ycount); | 596 | EXPORT_SYMBOL(get_dma_curr_ycount); |
597 | 597 | ||
598 | void *dma_memcpy(void *dest, const void *src, size_t size) | 598 | void *_dma_memcpy(void *dest, const void *src, size_t size) |
599 | { | 599 | { |
600 | int direction; /* 1 - address decrease, 0 - address increase */ | 600 | int direction; /* 1 - address decrease, 0 - address increase */ |
601 | int flag_align; /* 1 - address aligned, 0 - address unaligned */ | 601 | 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 | 734 | ||
735 | return dest; | 735 | return dest; |
736 | } | 736 | } |
737 | |||
738 | void *dma_memcpy(void *dest, const void *src, size_t size) | ||
739 | { | ||
740 | size_t bulk; | ||
741 | size_t rest; | ||
742 | void * addr; | ||
743 | |||
744 | bulk = (size >> 16) << 16; | ||
745 | rest = size - bulk; | ||
746 | if (bulk) | ||
747 | _dma_memcpy(dest, src, bulk); | ||
748 | addr = _dma_memcpy(dest+bulk, src+bulk, rest); | ||
749 | return addr; | ||
750 | } | ||
751 | |||
737 | EXPORT_SYMBOL(dma_memcpy); | 752 | EXPORT_SYMBOL(dma_memcpy); |
738 | 753 | ||
739 | void *safe_dma_memcpy(void *dest, const void *src, size_t size) | 754 | void *safe_dma_memcpy(void *dest, const void *src, size_t size) |