dma-mapping.h 547 B

1234567891011121314151617181920
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_GENERIC_DMA_MAPPING_H
  3. #define _ASM_GENERIC_DMA_MAPPING_H
  4. static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
  5. {
  6. /*
  7. * Use the non-coherent ops if available. If an architecture wants a
  8. * more fine-grained selection of operations it will have to implement
  9. * get_arch_dma_ops itself or use the per-device dma_ops.
  10. */
  11. #ifdef CONFIG_DMA_NONCOHERENT_OPS
  12. return &dma_noncoherent_ops;
  13. #else
  14. return &dma_direct_ops;
  15. #endif
  16. }
  17. #endif /* _ASM_GENERIC_DMA_MAPPING_H */