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>
This commit is contained in:

committed by
Ralf Baechle

parent
8005711c8d
commit
88e9a93c9d
@@ -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. */
|
||||
|
Reference in New Issue
Block a user