diff options
author | Steven J. Hill <Steven.Hill@imgtec.com> | 2013-03-25 13:47:29 -0500 |
---|---|---|
committer | Steven J. Hill <Steven.Hill@imgtec.com> | 2013-05-01 16:32:49 -0500 |
commit | b6d92b4a6bdb880b39789c677b952c53a437028d (patch) | |
tree | f14d30f02314d75860aa1ed12449410e6659513b /arch/mips/include | |
parent | c34c09c81d659e13e15947580198fa652af3ca1a (diff) | |
download | op-kernel-dev-b6d92b4a6bdb880b39789c677b952c53a437028d.zip op-kernel-dev-b6d92b4a6bdb880b39789c677b952c53a437028d.tar.gz |
MIPS: Add option to disable software I/O coherency.
Some MIPS controllers have hardware I/O coherency. This patch
detects those and turns off software coherency. A new kernel
command line option also allows the user to manually turn
software coherency on or off.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/dma-coherence.h | 15 | ||||
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 1 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-generic/dma-coherence.h | 5 |
3 files changed, 18 insertions, 3 deletions
diff --git a/arch/mips/include/asm/dma-coherence.h b/arch/mips/include/asm/dma-coherence.h new file mode 100644 index 0000000..242cbb3 --- /dev/null +++ b/arch/mips/include/asm/dma-coherence.h @@ -0,0 +1,15 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> + * + */ +#ifndef __ASM_DMA_COHERENCE_H +#define __ASM_DMA_COHERENCE_H + +extern int coherentio; +extern int hw_coherentio; + +#endif diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index f8fc74b..84238c5 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -2,6 +2,7 @@ #define _ASM_DMA_MAPPING_H #include <asm/scatterlist.h> +#include <asm/dma-coherence.h> #include <asm/cache.h> #include <asm-generic/dma-coherent.h> diff --git a/arch/mips/include/asm/mach-generic/dma-coherence.h b/arch/mips/include/asm/mach-generic/dma-coherence.h index 9c95177..fe23034 100644 --- a/arch/mips/include/asm/mach-generic/dma-coherence.h +++ b/arch/mips/include/asm/mach-generic/dma-coherence.h @@ -61,9 +61,8 @@ static inline int plat_device_is_coherent(struct device *dev) { #ifdef CONFIG_DMA_COHERENT return 1; -#endif -#ifdef CONFIG_DMA_NONCOHERENT - return 0; +#else + return coherentio; #endif } |