dma-coherence.h 813 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org>
  7. *
  8. */
  9. #ifndef __ASM_DMA_COHERENCE_H
  10. #define __ASM_DMA_COHERENCE_H
  11. enum coherent_io_user_state {
  12. IO_COHERENCE_DEFAULT,
  13. IO_COHERENCE_ENABLED,
  14. IO_COHERENCE_DISABLED,
  15. };
  16. #if defined(CONFIG_DMA_PERDEV_COHERENT)
  17. /* Don't provide (hw_)coherentio to avoid misuse */
  18. #elif defined(CONFIG_DMA_MAYBE_COHERENT)
  19. extern enum coherent_io_user_state coherentio;
  20. extern int hw_coherentio;
  21. #else
  22. #ifdef CONFIG_DMA_COHERENT
  23. #define coherentio IO_COHERENCE_ENABLED
  24. #else
  25. #define coherentio IO_COHERENCE_DISABLED
  26. #endif
  27. #define hw_coherentio 0
  28. #endif /* CONFIG_DMA_MAYBE_COHERENT */
  29. #endif