MIPS: Extend DMA_MAYBE_COHERENT logic to DMA_NONCOHERENT use
Setting DMA_MAYBE_COHERENT gives a platform the opportunity to select use of cache ops at boot. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/6575/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
bfc3c5a6c7
commit
8005711c8d
@@ -673,7 +673,7 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end)
|
||||
instruction_hazard();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DMA_NONCOHERENT
|
||||
#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_DMA_MAYBE_COHERENT)
|
||||
|
||||
static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
|
||||
{
|
||||
@@ -744,7 +744,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
|
||||
bc_inv(addr, size);
|
||||
__sync();
|
||||
}
|
||||
#endif /* CONFIG_DMA_NONCOHERENT */
|
||||
#endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
|
||||
|
||||
/*
|
||||
* While we're protected against bad userland addresses we don't care
|
||||
@@ -1559,7 +1559,7 @@ void r4k_cache_init(void)
|
||||
flush_icache_range = r4k_flush_icache_range;
|
||||
local_flush_icache_range = local_r4k_flush_icache_range;
|
||||
|
||||
#if defined(CONFIG_DMA_NONCOHERENT)
|
||||
#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_DMA_MAYBE_COHERENT)
|
||||
if (coherentio) {
|
||||
_dma_cache_wback_inv = (void *)cache_noop;
|
||||
_dma_cache_wback = (void *)cache_noop;
|
||||
|
Reference in New Issue
Block a user