sh: Kill off virt_to_bus()/bus_to_virt().
Wire up ARCH_NO_VIRT_TO_BUS, and kill off the remaining users. The dma-mapping code really wanted virt_to_phys()/phys_to_virt() anyways, there are no inherently special bus addresses. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -69,11 +69,11 @@ static inline dma_addr_t dma_map_single(struct device *dev,
|
||||
{
|
||||
#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
|
||||
if (dev->bus == &pci_bus_type)
|
||||
return virt_to_bus(ptr);
|
||||
return virt_to_phys(ptr);
|
||||
#endif
|
||||
dma_cache_sync(dev, ptr, size, dir);
|
||||
|
||||
return virt_to_bus(ptr);
|
||||
return virt_to_phys(ptr);
|
||||
}
|
||||
|
||||
#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,
|
||||
if (dev->bus == &pci_bus_type)
|
||||
return;
|
||||
#endif
|
||||
dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir);
|
||||
dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir);
|
||||
}
|
||||
|
||||
static inline void dma_sync_single_range(struct device *dev,
|
||||
@@ -128,7 +128,7 @@ static inline void dma_sync_single_range(struct device *dev,
|
||||
if (dev->bus == &pci_bus_type)
|
||||
return;
|
||||
#endif
|
||||
dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir);
|
||||
dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir);
|
||||
}
|
||||
|
||||
static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
|
||||
|
Reference in New Issue
Block a user