Skip to content

Commit dcbae4b

Browse files
committed
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>
1 parent 4c912c1 commit dcbae4b

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

  • arch/microblaze/kernel

‎arch/microblaze/kernel/dma.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,15 @@
2020
* can set archdata.dma_data to an unsigned long holding the offset. By
2121
* default the offset is PCI_DRAM_OFFSET.
2222
*/
23-
24-
static inline void __dma_sync_page(void *paddr, unsigned long offset,
23+
static inline void __dma_sync_page(unsigned long paddr, unsigned long offset,
2524
size_t size, enum dma_data_direction direction)
2625
{
27-
unsigned long start = (unsigned long)paddr;
28-
2926
switch (direction) {
3027
case DMA_TO_DEVICE:
31-
flush_dcache_range(start + offset, start + offset + size);
28+
flush_dcache_range(paddr + offset, paddr + offset + size);
3229
break;
3330
case DMA_FROM_DEVICE:
34-
invalidate_dcache_range(start + offset, start + offset + size);
31+
invalidate_dcache_range(paddr + offset, paddr + offset + size);
3532
break;
3633
default:
3734
BUG();

0 commit comments

Comments
 (0)