aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2008-12-10 21:14:45 -0500
committerRalf Baechle <ralf@linux-mips.org>2008-12-12 13:12:23 -0500
commit11531ac2d3f24c3dc4df3861d72d1e8b9b8b6317 (patch)
treefed0eea7c375402c660490d2aea4c2ea256aa9a5
parent00ace207164cb414efba406830256721f45c1c62 (diff)
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);
111void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr, 111void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
112 dma_addr_t dma_handle) 112 dma_addr_t dma_handle)
113{ 113{
114 plat_unmap_dma_mem(dma_handle);
114 free_pages((unsigned long) vaddr, get_order(size)); 115 free_pages((unsigned long) vaddr, get_order(size));
115} 116}
116 117
@@ -121,6 +122,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
121{ 122{
122 unsigned long addr = (unsigned long) vaddr; 123 unsigned long addr = (unsigned long) vaddr;
123 124
125 plat_unmap_dma_mem(dma_handle);
126
124 if (!plat_device_is_coherent(dev)) 127 if (!plat_device_is_coherent(dev))
125 addr = CAC_ADDR(addr); 128 addr = CAC_ADDR(addr);
126 129