summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/dma-nommu.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-10-27 10:35:02 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-10-27 10:35:02 +0900
commit01be5d63fd4645eab1d05a7caa04462c11c8b7a1 (patch)
tree9c316a404a55dc2a43ef5e0156590d37a828cf54 /arch/sh/kernel/dma-nommu.c
parent3f375f12ecb9c691dda70bb64b313e55fe6ee4ee (diff)
sh: Revamp PCI DMA coherence Kconfig bits.
Leaving this configurable caused more trouble than it was ever worth, so just make it explicit. Boards that are verified one way or the other can fix up their selects accordingly. We presently default to non-coherent for most platforms. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/dma-nommu.c')
-rw-r--r--arch/sh/kernel/dma-nommu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/dma-nommu.c b/arch/sh/kernel/dma-nommu.c
index b336fcf40f1..3c55b87f8b6 100644
--- a/arch/sh/kernel/dma-nommu.c
+++ b/arch/sh/kernel/dma-nommu.c
@@ -44,6 +44,7 @@ static int nommu_map_sg(struct device *dev, struct scatterlist *sg,
return nents;
}
+#ifdef CONFIG_DMA_NONCOHERENT
static void nommu_sync_single(struct device *dev, dma_addr_t addr,
size_t size, enum dma_data_direction dir)
{
@@ -59,14 +60,17 @@ static void nommu_sync_sg(struct device *dev, struct scatterlist *sg,
for_each_sg(sg, s, nelems, i)
dma_cache_sync(dev, sg_virt(s), s->length, dir);
}
+#endif
struct dma_map_ops nommu_dma_ops = {
.alloc_coherent = dma_generic_alloc_coherent,
.free_coherent = dma_generic_free_coherent,
.map_page = nommu_map_page,
.map_sg = nommu_map_sg,
+#ifdef CONFIG_DMA_NONCOHERENT
.sync_single_for_device = nommu_sync_single,
.sync_sg_for_device = nommu_sync_sg,
+#endif
.is_phys = 1,
};