Re: [U-Boot] [u-boot 13/40] arm: asm: dma-mapping: added dma_free_coherent API

2015-02-16 Thread Lukasz Majewski
Hi Kishon,

> 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 
> ---
>  arch/arm/include/asm/dma-mapping.h |7 +++
>  1 file changed, 7 insertions(+)
> 
> 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)
>  {

Reviewed-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [u-boot 13/40] arm: asm: dma-mapping: added dma_free_coherent API

2015-02-06 Thread Kishon Vijay Abraham I
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 
---
 arch/arm/include/asm/dma-mapping.h |7 +++
 1 file changed, 7 insertions(+)

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
 
+#definedma_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)
 {
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot