aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/dma.c')
-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 @@
20 * can set archdata.dma_data to an unsigned long holding the offset. By 20 * can set archdata.dma_data to an unsigned long holding the offset. By
21 * default the offset is PCI_DRAM_OFFSET. 21 * default the offset is PCI_DRAM_OFFSET.
22 */ 22 */
23 23static inline void __dma_sync_page(unsigned long paddr, unsigned long offset,
24static inline void __dma_sync_page(void *paddr, unsigned long offset,
25 size_t size, enum dma_data_direction direction) 24 size_t size, enum dma_data_direction direction)
26{ 25{
27 unsigned long start = (unsigned long)paddr;
28
29 switch (direction) { 26 switch (direction) {
30 case DMA_TO_DEVICE: 27 case DMA_TO_DEVICE:
31 flush_dcache_range(start + offset, start + offset + size); 28 flush_dcache_range(paddr + offset, paddr + offset + size);
32 break; 29 break;
33 case DMA_FROM_DEVICE: 30 case DMA_FROM_DEVICE:
34 invalidate_dcache_range(start + offset, start + offset + size); 31 invalidate_dcache_range(paddr + offset, paddr + offset + size);
35 break; 32 break;
36 default: 33 default:
37 BUG(); 34 BUG();