Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef DMA_H
0003 #define DMA_H
0004 
0005 #include <asm/glue-cache.h>
0006 
0007 #ifndef MULTI_CACHE
0008 #define dmac_map_area           __glue(_CACHE,_dma_map_area)
0009 #define dmac_unmap_area         __glue(_CACHE,_dma_unmap_area)
0010 
0011 /*
0012  * These are private to the dma-mapping API.  Do not use directly.
0013  * Their sole purpose is to ensure that data held in the cache
0014  * is visible to DMA, or data written by DMA to system memory is
0015  * visible to the CPU.
0016  */
0017 extern void dmac_map_area(const void *, size_t, int);
0018 extern void dmac_unmap_area(const void *, size_t, int);
0019 
0020 #else
0021 
0022 /*
0023  * These are private to the dma-mapping API.  Do not use directly.
0024  * Their sole purpose is to ensure that data held in the cache
0025  * is visible to DMA, or data written by DMA to system memory is
0026  * visible to the CPU.
0027  */
0028 #define dmac_map_area           cpu_cache.dma_map_area
0029 #define dmac_unmap_area         cpu_cache.dma_unmap_area
0030 
0031 #endif
0032 
0033 #endif