]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/openrisc/include/asm/dma-mapping.h
dma-mapping: consolidate dma_{alloc,free}_noncoherent
[linux-beck.git] / arch / openrisc / include / asm / dma-mapping.h
index fab8628e1b6e70d5c8159ca652992f2556e7eeb7..57722528ea4d46b2638529f95f4721c6f37e1217 100644 (file)
@@ -23,7 +23,6 @@
  */
 
 #include <linux/dma-debug.h>
-#include <asm-generic/dma-coherent.h>
 #include <linux/kmemcheck.h>
 #include <linux/dma-mapping.h>
 
@@ -38,55 +37,6 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
 
 #include <asm-generic/dma-mapping-common.h>
 
-#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) 
-
-static inline void *dma_alloc_attrs(struct device *dev, size_t size,
-                                   dma_addr_t *dma_handle, gfp_t gfp,
-                                   struct dma_attrs *attrs)
-{
-       struct dma_map_ops *ops = get_dma_ops(dev);
-       void *memory;
-
-       memory = ops->alloc(dev, size, dma_handle, gfp, attrs);
-
-       debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
-
-       return memory;
-}
-
-#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
-
-static inline void dma_free_attrs(struct device *dev, size_t size,
-                                 void *cpu_addr, dma_addr_t dma_handle,
-                                 struct dma_attrs *attrs)
-{
-       struct dma_map_ops *ops = get_dma_ops(dev);
-
-       debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
-
-       ops->free(dev, size, cpu_addr, dma_handle, attrs);
-}
-
-static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
-                                         dma_addr_t *dma_handle, gfp_t gfp)
-{
-       struct dma_attrs attrs;
-
-       dma_set_attr(DMA_ATTR_NON_CONSISTENT, &attrs);
-
-       return dma_alloc_attrs(dev, size, dma_handle, gfp, &attrs);
-}
-
-static inline void dma_free_noncoherent(struct device *dev, size_t size,
-                                        void *cpu_addr, dma_addr_t dma_handle)
-{
-       struct dma_attrs attrs;
-
-       dma_set_attr(DMA_ATTR_NON_CONSISTENT, &attrs);
-
-       dma_free_attrs(dev, size, cpu_addr, dma_handle, &attrs);
-}
-
 static inline int dma_supported(struct device *dev, u64 dma_mask)
 {
        /* Support 32 bit DMA mask exclusively */