dma.h 910 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef DMA_H
  3. #define DMA_H
  4. #include <asm/glue-cache.h>
  5. #ifndef MULTI_CACHE
  6. #define dmac_map_area __glue(_CACHE,_dma_map_area)
  7. #define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
  8. /*
  9. * These are private to the dma-mapping API. Do not use directly.
  10. * Their sole purpose is to ensure that data held in the cache
  11. * is visible to DMA, or data written by DMA to system memory is
  12. * visible to the CPU.
  13. */
  14. extern void dmac_map_area(const void *, size_t, int);
  15. extern void dmac_unmap_area(const void *, size_t, int);
  16. #else
  17. /*
  18. * These are private to the dma-mapping API. Do not use directly.
  19. * Their sole purpose is to ensure that data held in the cache
  20. * is visible to DMA, or data written by DMA to system memory is
  21. * visible to the CPU.
  22. */
  23. #define dmac_map_area cpu_cache.dma_map_area
  24. #define dmac_unmap_area cpu_cache.dma_unmap_area
  25. #endif
  26. #endif