forked from luck/tmp_suning_uos_patched
MIPS: move coherentio setup to setup.c
We want to be able to use it even when not building dma-default.c in the near future. Signed-off-by: Christoph Hellwig <hch@lst.de> Patchwork: https://patchwork.linux-mips.org/patch/19543/ Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: David Daney <david.daney@cavium.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de> Cc: Huacai Chen <chenhc@lemote.com> Cc: iommu@lists.linux-foundation.org Cc: linux-mips@linux-mips.org
This commit is contained in:
parent
54aed4dd35
commit
aa4db77595
|
@ -36,6 +36,7 @@
|
|||
#include <asm/cdmm.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/debug.h>
|
||||
#include <asm/dma-coherence.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/smp-ops.h>
|
||||
|
@ -1055,3 +1056,26 @@ static int __init debugfs_mips(void)
|
|||
}
|
||||
arch_initcall(debugfs_mips);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DMA_MAYBE_COHERENT) && !defined(CONFIG_DMA_PERDEV_COHERENT)
|
||||
/* User defined DMA coherency from command line. */
|
||||
enum coherent_io_user_state coherentio = IO_COHERENCE_DEFAULT;
|
||||
EXPORT_SYMBOL_GPL(coherentio);
|
||||
int hw_coherentio = 0; /* Actual hardware supported DMA coherency setting. */
|
||||
|
||||
static int __init setcoherentio(char *str)
|
||||
{
|
||||
coherentio = IO_COHERENCE_ENABLED;
|
||||
pr_info("Hardware DMA cache coherency (command line)\n");
|
||||
return 0;
|
||||
}
|
||||
early_param("coherentio", setcoherentio);
|
||||
|
||||
static int __init setnocoherentio(char *str)
|
||||
{
|
||||
coherentio = IO_COHERENCE_DISABLED;
|
||||
pr_info("Software DMA cache coherency (command line)\n");
|
||||
return 0;
|
||||
}
|
||||
early_param("nocoherentio", setnocoherentio);
|
||||
#endif
|
||||
|
|
|
@ -24,29 +24,6 @@
|
|||
|
||||
#include <dma-coherence.h>
|
||||
|
||||
#if defined(CONFIG_DMA_MAYBE_COHERENT) && !defined(CONFIG_DMA_PERDEV_COHERENT)
|
||||
/* User defined DMA coherency from command line. */
|
||||
enum coherent_io_user_state coherentio = IO_COHERENCE_DEFAULT;
|
||||
EXPORT_SYMBOL_GPL(coherentio);
|
||||
int hw_coherentio = 0; /* Actual hardware supported DMA coherency setting. */
|
||||
|
||||
static int __init setcoherentio(char *str)
|
||||
{
|
||||
coherentio = IO_COHERENCE_ENABLED;
|
||||
pr_info("Hardware DMA cache coherency (command line)\n");
|
||||
return 0;
|
||||
}
|
||||
early_param("coherentio", setcoherentio);
|
||||
|
||||
static int __init setnocoherentio(char *str)
|
||||
{
|
||||
coherentio = IO_COHERENCE_DISABLED;
|
||||
pr_info("Software DMA cache coherency (command line)\n");
|
||||
return 0;
|
||||
}
|
||||
early_param("nocoherentio", setnocoherentio);
|
||||
#endif
|
||||
|
||||
static inline struct page *dma_addr_to_page(struct device *dev,
|
||||
dma_addr_t dma_addr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user