This source file includes following definitions.
- dev_is_dma_coherent
1
2
3
4
5
6
7
8
9 #ifndef __ASM_DMA_COHERENCE_H
10 #define __ASM_DMA_COHERENCE_H
11
12 enum coherent_io_user_state {
13 IO_COHERENCE_DEFAULT,
14 IO_COHERENCE_ENABLED,
15 IO_COHERENCE_DISABLED,
16 };
17
18 #if defined(CONFIG_DMA_PERDEV_COHERENT)
19
20 #elif defined(CONFIG_DMA_MAYBE_COHERENT)
21 extern enum coherent_io_user_state coherentio;
22 extern int hw_coherentio;
23
24 static inline bool dev_is_dma_coherent(struct device *dev)
25 {
26 return coherentio == IO_COHERENCE_ENABLED ||
27 (coherentio == IO_COHERENCE_DEFAULT && hw_coherentio);
28 }
29 #else
30 #ifdef CONFIG_DMA_NONCOHERENT
31 #define coherentio IO_COHERENCE_DISABLED
32 #else
33 #define coherentio IO_COHERENCE_ENABLED
34 #endif
35 #define hw_coherentio 0
36 #endif
37
38 #endif