MIPS: Add missing calls to plat_unmap_dma_mem.
dma_free_noncoherent() and dma_free_coherent() are missing calls to plat_unmap_dma_mem(). This patch adds them. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
00ace20716
commit
11531ac2d3
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
|
|||||||
void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
|
void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
|
||||||
dma_addr_t dma_handle)
|
dma_addr_t dma_handle)
|
||||||
{
|
{
|
||||||
|
plat_unmap_dma_mem(dma_handle);
|
||||||
free_pages((unsigned long) vaddr, get_order(size));
|
free_pages((unsigned long) vaddr, get_order(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
|
|||||||
{
|
{
|
||||||
unsigned long addr = (unsigned long) vaddr;
|
unsigned long addr = (unsigned long) vaddr;
|
||||||
|
|
||||||
|
plat_unmap_dma_mem(dma_handle);
|
||||||
|
|
||||||
if (!plat_device_is_coherent(dev))
|
if (!plat_device_is_coherent(dev))
|
||||||
addr = CAC_ADDR(addr);
|
addr = CAC_ADDR(addr);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user