diff options
author | Manuel Lauss <manuel.lauss@gmail.com> | 2014-02-20 14:59:23 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-26 23:09:21 +0100 |
commit | 88e9a93c9d53ddcf633aa07f14245da7f30408c2 (patch) | |
tree | 743667e5317873f87f82a430c71de90cd106b34a /arch/mips/alchemy/common/setup.c | |
parent | 8005711c8d80e452748e9572bead54493818f042 (diff) |
MIPS: Alchemy: Determine cohereny at runtime based on cpu type
All Alchemy chips have coherent DMA, but for example the USB or AC97
peripherals on the Au1000/1500/1100 are not.
This patch uses DMA_MAYBE_COHERENT on Alchemy and sets coherentio based
on CPU type.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/6576/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/alchemy/common/setup.c')
-rw-r--r-- | arch/mips/alchemy/common/setup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 62b4e7bbeab9..566a1743f685 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c @@ -30,6 +30,7 @@ #include <linux/jiffies.h> #include <linux/module.h> +#include <asm/dma-coherence.h> #include <asm/mipsregs.h> #include <asm/time.h> @@ -59,6 +60,15 @@ void __init plat_mem_setup(void) /* Clear to obtain best system bus performance */ clear_c0_config(1 << 19); /* Clear Config[OD] */ + hw_coherentio = 0; + coherentio = 1; + switch (alchemy_get_cputype()) { + case ALCHEMY_CPU_AU1000: + case ALCHEMY_CPU_AU1500: + case ALCHEMY_CPU_AU1100: + coherentio = 0; + } + board_setup(); /* board specific setup */ /* IO/MEM resources. */ |