提交 f454aa6b 编写于 作者: R Russell King 提交者: Russell King

[ARM] Provide dummy noncoherent DMA API

We don't currently support the noncoherent DMA API, but it needs to
be provided for kernels with devres to link.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 017cc022
...@@ -61,6 +61,22 @@ static inline int dma_mapping_error(dma_addr_t dma_addr) ...@@ -61,6 +61,22 @@ static inline int dma_mapping_error(dma_addr_t dma_addr)
return dma_addr == ~0; return dma_addr == ~0;
} }
/*
* Dummy noncoherent implementation. We don't provide a dma_cache_sync
* function so drivers using this API are highlighted with build warnings.
*/
static inline void *
dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
{
return NULL;
}
static inline void
dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t handle)
{
}
/** /**
* dma_alloc_coherent - allocate consistent memory for DMA * dma_alloc_coherent - allocate consistent memory for DMA
* @dev: valid struct device pointer, or NULL for ISA and EISA-like devices * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册