Russell King | 1234e3f | 2015-07-24 09:10:55 +0100 | [diff] [blame] | 1 | #ifndef DMA_H |
| 2 | #define DMA_H |
| 3 | |
| 4 | #include <asm/glue-cache.h> |
| 5 | |
| 6 | #ifndef MULTI_CACHE |
Russell King | 1234e3f | 2015-07-24 09:10:55 +0100 | [diff] [blame] | 7 | /* |
| 8 | * These are private to the dma-mapping API. Do not use directly. |
| 9 | * Their sole purpose is to ensure that data held in the cache |
| 10 | * is visible to DMA, or data written by DMA to system memory is |
| 11 | * visible to the CPU. |
| 12 | */ |
| 13 | extern void dmac_map_area(const void *, size_t, int); |
| 14 | extern void dmac_unmap_area(const void *, size_t, int); |
| 15 | |
| 16 | #else |
| 17 | |
| 18 | /* |
| 19 | * These are private to the dma-mapping API. Do not use directly. |
| 20 | * Their sole purpose is to ensure that data held in the cache |
| 21 | * is visible to DMA, or data written by DMA to system memory is |
| 22 | * visible to the CPU. |
| 23 | */ |
| 24 | #define dmac_map_area cpu_cache.dma_map_area |
| 25 | #define dmac_unmap_area cpu_cache.dma_unmap_area |
| 26 | |
| 27 | #endif |
| 28 | |
| 29 | #endif |