ARM: dma-mapping: provide per-cpu type map/unmap functions
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-By: Santosh Shilimkar <santosh.shilimkar@ti.com>
This commit is contained in:
@@ -213,6 +213,9 @@ struct cpu_cache_fns {
|
||||
void (*coherent_user_range)(unsigned long, unsigned long);
|
||||
void (*flush_kern_dcache_area)(void *, size_t);
|
||||
|
||||
void (*dma_map_area)(const void *, size_t, int);
|
||||
void (*dma_unmap_area)(const void *, size_t, int);
|
||||
|
||||
void (*dma_inv_range)(const void *, const void *);
|
||||
void (*dma_clean_range)(const void *, const void *);
|
||||
void (*dma_flush_range)(const void *, const void *);
|
||||
@@ -244,6 +247,8 @@ extern struct cpu_cache_fns cpu_cache;
|
||||
* is visible to DMA, or data written by DMA to system memory is
|
||||
* visible to the CPU.
|
||||
*/
|
||||
#define dmac_map_area cpu_cache.dma_map_area
|
||||
#define dmac_unmap_area cpu_cache.dma_unmap_area
|
||||
#define dmac_inv_range cpu_cache.dma_inv_range
|
||||
#define dmac_clean_range cpu_cache.dma_clean_range
|
||||
#define dmac_flush_range cpu_cache.dma_flush_range
|
||||
@@ -270,10 +275,14 @@ extern void __cpuc_flush_dcache_area(void *, size_t);
|
||||
* is visible to DMA, or data written by DMA to system memory is
|
||||
* visible to the CPU.
|
||||
*/
|
||||
#define dmac_map_area __glue(_CACHE,_dma_map_area)
|
||||
#define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
|
||||
#define dmac_inv_range __glue(_CACHE,_dma_inv_range)
|
||||
#define dmac_clean_range __glue(_CACHE,_dma_clean_range)
|
||||
#define dmac_flush_range __glue(_CACHE,_dma_flush_range)
|
||||
|
||||
extern void dmac_map_area(const void *, size_t, int);
|
||||
extern void dmac_unmap_area(const void *, size_t, int);
|
||||
extern void dmac_inv_range(const void *, const void *);
|
||||
extern void dmac_clean_range(const void *, const void *);
|
||||
extern void dmac_flush_range(const void *, const void *);
|
||||
|
Reference in New Issue
Block a user