[MIPS] Fix dma_sync_*_for_device() functions

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 4a32e93..a72093a 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -246,10 +246,10 @@
 {
 	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 @@
 {
 	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);