aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh64/dma-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh64/dma-mapping.h')
-rw-r--r--include/asm-sh64/dma-mapping.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index c7c0f059cdc4..d505f357f819 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -51,11 +51,11 @@ static inline dma_addr_t dma_map_single(struct device *dev,
51{ 51{
52#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) 52#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
53 if (dev->bus == &pci_bus_type) 53 if (dev->bus == &pci_bus_type)
54 return virt_to_bus(ptr); 54 return virt_to_phys(ptr);
55#endif 55#endif
56 dma_cache_sync(dev, ptr, size, dir); 56 dma_cache_sync(dev, ptr, size, dir);
57 57
58 return virt_to_bus(ptr); 58 return virt_to_phys(ptr);
59} 59}
60 60
61#define dma_unmap_single(dev, addr, size, dir) do { } while (0) 61#define dma_unmap_single(dev, addr, size, dir) do { } while (0)
@@ -98,7 +98,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
98 if (dev->bus == &pci_bus_type) 98 if (dev->bus == &pci_bus_type)
99 return; 99 return;
100#endif 100#endif
101 dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); 101 dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir);
102} 102}
103 103
104static inline void dma_sync_single_range(struct device *dev, 104static inline void dma_sync_single_range(struct device *dev,
@@ -110,7 +110,7 @@ static inline void dma_sync_single_range(struct device *dev,
110 if (dev->bus == &pci_bus_type) 110 if (dev->bus == &pci_bus_type)
111 return; 111 return;
112#endif 112#endif
113 dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); 113 dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir);
114} 114}
115 115
116static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, 116static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,