2018-05-06 17:58:06 -04:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2008-01-31 21:15:53 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007
|
2011-11-01 00:00:39 +01:00
|
|
|
* Stelian Pop <stelian@popies.net>
|
2008-01-31 21:15:53 +00:00
|
|
|
* Lead Tech Design <www.leadtechdesign.com>
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_ARM_DMA_MAPPING_H
|
|
|
|
#define __ASM_ARM_DMA_MAPPING_H
|
|
|
|
|
2017-08-26 00:50:17 +09:00
|
|
|
#include <linux/dma-direction.h>
|
2015-02-23 18:39:56 +05:30
|
|
|
|
2017-08-26 00:50:17 +09:00
|
|
|
#define dma_mapping_error(x, y) 0
|
2008-01-31 21:15:53 +00:00
|
|
|
|
2015-02-23 18:39:49 +05:30
|
|
|
static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
|
2008-01-31 21:15:53 +00:00
|
|
|
{
|
2013-07-29 13:51:43 +08:00
|
|
|
*handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
|
2008-01-31 21:15:53 +00:00
|
|
|
return (void *)*handle;
|
|
|
|
}
|
|
|
|
|
2015-02-23 18:39:56 +05:30
|
|
|
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 */
|