summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-02-09 09:25:08 +0100
committerMichal Simek <monstr@monstr.eu>2010-03-11 14:10:02 +0100
commitdcbae4be907488df5e1cc8a89b7df1a0565c257c (patch)
treeb0c9eb8f524e98c87f029e9b0d400ed261f59b29 /arch
parent4c912c1a33abb67aefecb5ed8bd73d91887c4977 (diff)
microblaze: Preliminary support for dma drivers
I found several problems for ll_temac driver and on system with WB. This early fix should fix it. I will clean this patch before I will add it to mainline Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/kernel/dma.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index f230a8de0bcd..fbe1e8184eff 100644
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -20,18 +20,15 @@
* can set archdata.dma_data to an unsigned long holding the offset. By
* default the offset is PCI_DRAM_OFFSET.
*/
-
-static inline void __dma_sync_page(void *paddr, unsigned long offset,
+static inline void __dma_sync_page(unsigned long paddr, unsigned long offset,
size_t size, enum dma_data_direction direction)
{
- unsigned long start = (unsigned long)paddr;
-
switch (direction) {
case DMA_TO_DEVICE:
- flush_dcache_range(start + offset, start + offset + size);
+ flush_dcache_range(paddr + offset, paddr + offset + size);
break;
case DMA_FROM_DEVICE:
- invalidate_dcache_range(start + offset, start + offset + size);
+ invalidate_dcache_range(paddr + offset, paddr + offset + size);
break;
default:
BUG();