]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
microblaze: Preliminary support for dma drivers
authorMichal Simek <monstr@monstr.eu>
Tue, 9 Feb 2010 08:25:08 +0000 (09:25 +0100)
committerMichal Simek <monstr@monstr.eu>
Thu, 11 Mar 2010 13:10:02 +0000 (14:10 +0100)
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>
arch/microblaze/kernel/dma.c

index f230a8de0bcd320a49fc3a06eebc7c7b035a5983..fbe1e8184efff13db17406fddb1ee73c3a1b5d11 100644 (file)
  * 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();