Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / arch / mips / include / asm / dma-coherence.h
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
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 /* Don't provide (hw_)coherentio to avoid misuse */
20 #elif defined(CONFIG_DMA_MAYBE_COHERENT)
21 extern enum coherent_io_user_state coherentio;
22 extern int hw_coherentio;
23 #else
24 #ifdef CONFIG_DMA_NONCOHERENT
25 #define coherentio      IO_COHERENCE_DISABLED
26 #else
27 #define coherentio      IO_COHERENCE_ENABLED
28 #endif
29 #define hw_coherentio   0
30 #endif /* CONFIG_DMA_MAYBE_COHERENT */
31
32 #endif