2008-01-31 21:15:53 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007
|
2011-10-31 23:00:39 +00:00
|
|
|
* Stelian Pop <stelian@popies.net>
|
2008-01-31 21:15:53 +00:00
|
|
|
* Lead Tech Design <www.leadtechdesign.com>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-01-31 21:15:53 +00:00
|
|
|
*/
|
|
|
|
#ifndef __ASM_ARM_DMA_MAPPING_H
|
|
|
|
#define __ASM_ARM_DMA_MAPPING_H
|
|
|
|
|
2017-08-25 15:50:17 +00:00
|
|
|
#include <linux/dma-direction.h>
|
2015-02-23 13:09:56 +00:00
|
|
|
|
2017-08-25 15:50:17 +00:00
|
|
|
#define dma_mapping_error(x, y) 0
|
2008-01-31 21:15:53 +00:00
|
|
|
|
2015-02-23 13:09:49 +00:00
|
|
|
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
2008-01-31 21:15:53 +00:00
|
|
|
{
|
2013-07-29 05:51:43 +00:00
|
|
|
*handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
|
2008-01-31 21:15:53 +00:00
|
|
|
return (void *)*handle;
|
|
|
|
}
|
|
|
|
|
2015-02-23 13:09:56 +00:00
|
|
|
static inline void dma_free_coherent(void *addr)
|
|
|
|
{
|
|
|
|
free(addr);
|
|
|
|
}
|
|
|
|
|
2008-01-31 21:15:53 +00:00
|
|
|
static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
|
|
|
|
enum dma_data_direction dir)
|
|
|
|
{
|
|
|
|
return (unsigned long)vaddr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void dma_unmap_single(volatile void *vaddr, size_t len,
|
|
|
|
unsigned long paddr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __ASM_ARM_DMA_MAPPING_H */
|