aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/dma-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh/dma-mapping.h')
-rw-r--r--include/asm-sh/dma-mapping.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h
index d3bc7818bbbe..6f492ac3fa13 100644
--- a/include/asm-sh/dma-mapping.h
+++ b/include/asm-sh/dma-mapping.h
@@ -69,11 +69,11 @@ static inline dma_addr_t dma_map_single(struct device *dev,
69{ 69{
70#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) 70#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
71 if (dev->bus == &pci_bus_type) 71 if (dev->bus == &pci_bus_type)
72 return virt_to_bus(ptr); 72 return virt_to_phys(ptr);
73#endif 73#endif
74 dma_cache_sync(dev, ptr, size, dir); 74 dma_cache_sync(dev, ptr, size, dir);
75 75
76 return virt_to_bus(ptr); 76 return virt_to_phys(ptr);
77} 77}
78 78
79#define dma_unmap_single(dev, addr, size, dir) do { } while (0) 79#define dma_unmap_single(dev, addr, size, dir) do { } while (0)
@@ -116,7 +116,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
116 if (dev->bus == &pci_bus_type) 116 if (dev->bus == &pci_bus_type)
117 return; 117 return;
118#endif 118#endif
119 dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); 119 dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir);
120} 120}
121 121
122static inline void dma_sync_single_range(struct device *dev, 122static inline void dma_sync_single_range(struct device *dev,
@@ -128,7 +128,7 @@ static inline void dma_sync_single_range(struct device *dev,
128 if (dev->bus == &pci_bus_type) 128 if (dev->bus == &pci_bus_type)
129 return; 129 return;
130#endif 130#endif
131 dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); 131 dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir);
132} 132}
133 133
134static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, 134static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,