Merge branch 'drm-next-4.16' of git://people.freedesktop.org/~agd5f/linux into drm...
[sfrench/cifs-2.6.git] / arch / arm / include / asm / dma-mapping.h
index daf837423a766ee22db60439e9006ed617bda25e..8436f6ade57dd145a717c11aa5207854a68c25a0 100644 (file)
@@ -18,7 +18,7 @@ extern const struct dma_map_ops arm_coherent_dma_ops;
 
 static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
 {
-       return IS_ENABLED(CONFIG_MMU) ? &arm_dma_ops : &dma_noop_ops;
+       return IS_ENABLED(CONFIG_MMU) ? &arm_dma_ops : &dma_direct_ops;
 }
 
 #ifdef __arch_page_to_dma
@@ -109,39 +109,6 @@ static inline bool is_device_dma_coherent(struct device *dev)
        return dev->archdata.dma_coherent;
 }
 
-static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
-{
-       unsigned int offset = paddr & ~PAGE_MASK;
-       return pfn_to_dma(dev, __phys_to_pfn(paddr)) + offset;
-}
-
-static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
-{
-       unsigned int offset = dev_addr & ~PAGE_MASK;
-       return __pfn_to_phys(dma_to_pfn(dev, dev_addr)) + offset;
-}
-
-static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
-{
-       u64 limit, mask;
-
-       if (!dev->dma_mask)
-               return 0;
-
-       mask = *dev->dma_mask;
-
-       limit = (mask + 1) & ~mask;
-       if (limit && size > limit)
-               return 0;
-
-       if ((addr | (addr + size - 1)) & ~mask)
-               return 0;
-
-       return 1;
-}
-
-static inline void dma_mark_clean(void *addr, size_t size) { }
-
 /**
  * arm_dma_alloc - allocate consistent memory for DMA
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices