[MIPS] Fix dma_sync_*_for_device() functions
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 23 Feb 2007 18:58:48 +0000 (19:58 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 26 Feb 2007 23:06:06 +0000 (23:06 +0000)
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/dma-default.c

index 4a32e939698f6206fd29a8e454309c8b02687236..a72093ad105f093839d24488a7e24a74f816fec8 100644 (file)
@@ -246,10 +246,10 @@ void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
 {
        BUG_ON(direction == DMA_NONE);
 
-       if (cpu_is_noncoherent_r10000(dev)) {
+       if (!plat_device_is_coherent(dev)) {
                unsigned long addr;
 
-               addr = plat_dma_addr_to_phys(dma_handle);
+               addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);
                __dma_sync(addr, size, direction);
        }
 }
@@ -276,7 +276,7 @@ void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
 {
        BUG_ON(direction == DMA_NONE);
 
-       if (cpu_is_noncoherent_r10000(dev)) {
+       if (!plat_device_is_coherent(dev)) {
                unsigned long addr;
 
                addr = PAGE_OFFSET + plat_dma_addr_to_phys(dma_handle);