aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/hexagon/include')
-rw-r--r--arch/hexagon/include/asm/dma-mapping.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h
index 448b224ba4ef..233ed3d2d25e 100644
--- a/arch/hexagon/include/asm/dma-mapping.h
+++ b/arch/hexagon/include/asm/dma-mapping.h
@@ -71,29 +71,35 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
71 return (dma_addr == bad_dma_address); 71 return (dma_addr == bad_dma_address);
72} 72}
73 73
74static inline void *dma_alloc_coherent(struct device *dev, size_t size, 74#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL)
75 dma_addr_t *dma_handle, gfp_t flag) 75
76static inline void *dma_alloc_attrs(struct device *dev, size_t size,
77 dma_addr_t *dma_handle, gfp_t flag,
78 struct dma_attrs *attrs)
76{ 79{
77 void *ret; 80 void *ret;
78 struct dma_map_ops *ops = get_dma_ops(dev); 81 struct dma_map_ops *ops = get_dma_ops(dev);
79 82
80 BUG_ON(!dma_ops); 83 BUG_ON(!dma_ops);
81 84
82 ret = ops->alloc_coherent(dev, size, dma_handle, flag); 85 ret = ops->alloc(dev, size, dma_handle, flag, attrs);
83 86
84 debug_dma_alloc_coherent(dev, size, *dma_handle, ret); 87 debug_dma_alloc_coherent(dev, size, *dma_handle, ret);
85 88
86 return ret; 89 return ret;
87} 90}
88 91
89static inline void dma_free_coherent(struct device *dev, size_t size, 92#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL)
90 void *cpu_addr, dma_addr_t dma_handle) 93
94static inline void dma_free_attrs(struct device *dev, size_t size,
95 void *cpu_addr, dma_addr_t dma_handle,
96 struct dma_attrs *attrs)
91{ 97{
92 struct dma_map_ops *dma_ops = get_dma_ops(dev); 98 struct dma_map_ops *dma_ops = get_dma_ops(dev);
93 99
94 BUG_ON(!dma_ops); 100 BUG_ON(!dma_ops);
95 101
96 dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); 102 dma_ops->free(dev, size, cpu_addr, dma_handle, attrs);
97 103
98 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); 104 debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
99} 105}