summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2015-02-23 18:39:56 +0530
committerMarek Vasut <marex@denx.de>2015-04-14 05:48:09 +0200
commit2f06693567e259321406822b343f8aa70857c7bb (patch)
tree9b28785cd152468c11b1bf40441193ad27557ab6 /arch/arm
parent027b6103cdb806fd6441c983e9dc4b2d1b7f7019 (diff)
downloadu-boot-imx-2f06693567e259321406822b343f8aa70857c7bb.zip
u-boot-imx-2f06693567e259321406822b343f8aa70857c7bb.tar.gz
u-boot-imx-2f06693567e259321406822b343f8aa70857c7bb.tar.bz2
arm: asm: dma-mapping: added dma_free_coherent API
Added dma_free_coherent corresponding to the dma_alloc_coherent in dma-mapping.h in order to free memory allocated using dma_alloc_coherent. This API is used in dwc3 driver. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/dma-mapping.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 14f00efd2..a5821f5 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -8,6 +8,8 @@
#ifndef __ASM_ARM_DMA_MAPPING_H
#define __ASM_ARM_DMA_MAPPING_H
+#define dma_mapping_error(x, y) 0
+
enum dma_data_direction {
DMA_BIDIRECTIONAL = 0,
DMA_TO_DEVICE = 1,
@@ -20,6 +22,11 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
return (void *)*handle;
}
+static inline void dma_free_coherent(void *addr)
+{
+ free(addr);
+}
+
static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
enum dma_data_direction dir)
{