blob: 29c54f7d81f32f72553b3a17e92c9bcc5e03ba28 [file] [log] [blame]
Russell King1234e3f2015-07-24 09:10:55 +01001#ifndef DMA_H
2#define DMA_H
3
4#include <asm/glue-cache.h>
5
6#ifndef MULTI_CACHE
Russell King1234e3f2015-07-24 09:10:55 +01007/*
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 */
13extern void dmac_map_area(const void *, size_t, int);
14extern 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