提交 212836a9 编写于 作者: C Christoph Hellwig

dma-mapping: remove dma_{alloc,free,mmap}_writecombine

We can already use DMA_ATTR_WRITE_COMBINE or the _wc prefixed version,
so remove the third way of doing things.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 62fcee9a
...@@ -4609,11 +4609,10 @@ static int dispc_errata_i734_wa_init(struct dispc_device *dispc) ...@@ -4609,11 +4609,10 @@ static int dispc_errata_i734_wa_init(struct dispc_device *dispc)
i734_buf.size = i734.ovli.width * i734.ovli.height * i734_buf.size = i734.ovli.width * i734.ovli.height *
color_mode_to_bpp(i734.ovli.fourcc) / 8; color_mode_to_bpp(i734.ovli.fourcc) / 8;
i734_buf.vaddr = dma_alloc_writecombine(&dispc->pdev->dev, i734_buf.vaddr = dma_alloc_wc(&dispc->pdev->dev, i734_buf.size,
i734_buf.size, &i734_buf.paddr, &i734_buf.paddr, GFP_KERNEL);
GFP_KERNEL);
if (!i734_buf.vaddr) { if (!i734_buf.vaddr) {
dev_err(&dispc->pdev->dev, "%s: dma_alloc_writecombine failed\n", dev_err(&dispc->pdev->dev, "%s: dma_alloc_wc failed\n",
__func__); __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -4626,8 +4625,8 @@ static void dispc_errata_i734_wa_fini(struct dispc_device *dispc) ...@@ -4626,8 +4625,8 @@ static void dispc_errata_i734_wa_fini(struct dispc_device *dispc)
if (!dispc->feat->has_gamma_i734_bug) if (!dispc->feat->has_gamma_i734_bug)
return; return;
dma_free_writecombine(&dispc->pdev->dev, i734_buf.size, i734_buf.vaddr, dma_free_wc(&dispc->pdev->dev, i734_buf.size, i734_buf.vaddr,
i734_buf.paddr); i734_buf.paddr);
} }
static void dispc_errata_i734_wa(struct dispc_device *dispc) static void dispc_errata_i734_wa(struct dispc_device *dispc)
......
...@@ -796,9 +796,6 @@ static inline void *dma_alloc_wc(struct device *dev, size_t size, ...@@ -796,9 +796,6 @@ static inline void *dma_alloc_wc(struct device *dev, size_t size,
return dma_alloc_attrs(dev, size, dma_addr, gfp, attrs); return dma_alloc_attrs(dev, size, dma_addr, gfp, attrs);
} }
#ifndef dma_alloc_writecombine
#define dma_alloc_writecombine dma_alloc_wc
#endif
static inline void dma_free_wc(struct device *dev, size_t size, static inline void dma_free_wc(struct device *dev, size_t size,
void *cpu_addr, dma_addr_t dma_addr) void *cpu_addr, dma_addr_t dma_addr)
...@@ -806,9 +803,6 @@ static inline void dma_free_wc(struct device *dev, size_t size, ...@@ -806,9 +803,6 @@ static inline void dma_free_wc(struct device *dev, size_t size,
return dma_free_attrs(dev, size, cpu_addr, dma_addr, return dma_free_attrs(dev, size, cpu_addr, dma_addr,
DMA_ATTR_WRITE_COMBINE); DMA_ATTR_WRITE_COMBINE);
} }
#ifndef dma_free_writecombine
#define dma_free_writecombine dma_free_wc
#endif
static inline int dma_mmap_wc(struct device *dev, static inline int dma_mmap_wc(struct device *dev,
struct vm_area_struct *vma, struct vm_area_struct *vma,
...@@ -818,9 +812,6 @@ static inline int dma_mmap_wc(struct device *dev, ...@@ -818,9 +812,6 @@ static inline int dma_mmap_wc(struct device *dev,
return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size,
DMA_ATTR_WRITE_COMBINE); DMA_ATTR_WRITE_COMBINE);
} }
#ifndef dma_mmap_writecombine
#define dma_mmap_writecombine dma_mmap_wc
#endif
#ifdef CONFIG_NEED_DMA_MAP_STATE #ifdef CONFIG_NEED_DMA_MAP_STATE
#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册