summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2008-12-11 03:14:45 +0100
committerRalf Baechle <ralf@linux-mips.org>2008-12-12 19:12:23 +0100
commit11531ac2d3f24c3dc4df3861d72d1e8b9b8b6317 (patch)
treefed0eea7c375402c660490d2aea4c2ea256aa9a5
parentMIPS: Kconfig: Fix the arch-specific header path (diff)
downloadlinux-11531ac2d3f24c3dc4df3861d72d1e8b9b8b6317.tar.xz
linux-11531ac2d3f24c3dc4df3861d72d1e8b9b8b6317.zip
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>
-rw-r--r--arch/mips/mm/dma-default.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
index 5b98d0e731c2..e6708b3ad343 100644
--- a/arch/mips/mm/dma-default.c
+++ b/arch/mips/mm/dma-default.c
@@ -111,6 +111,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
dma_addr_t dma_handle)
{
+ plat_unmap_dma_mem(dma_handle);
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;
+ plat_unmap_dma_mem(dma_handle);
+
if (!plat_device_is_coherent(dev))
addr = CAC_ADDR(addr);