diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/dma-nommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/dma-nommu.c b/arch/sh/kernel/dma-nommu.c index b336fcf40f12..3c55b87f8b63 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, | |||
44 | return nents; | 44 | return nents; |
45 | } | 45 | } |
46 | 46 | ||
47 | #ifdef CONFIG_DMA_NONCOHERENT | ||
47 | static void nommu_sync_single(struct device *dev, dma_addr_t addr, | 48 | static void nommu_sync_single(struct device *dev, dma_addr_t addr, |
48 | size_t size, enum dma_data_direction dir) | 49 | size_t size, enum dma_data_direction dir) |
49 | { | 50 | { |
@@ -59,14 +60,17 @@ static void nommu_sync_sg(struct device *dev, struct scatterlist *sg, | |||
59 | for_each_sg(sg, s, nelems, i) | 60 | for_each_sg(sg, s, nelems, i) |
60 | dma_cache_sync(dev, sg_virt(s), s->length, dir); | 61 | dma_cache_sync(dev, sg_virt(s), s->length, dir); |
61 | } | 62 | } |
63 | #endif | ||
62 | 64 | ||
63 | struct dma_map_ops nommu_dma_ops = { | 65 | struct dma_map_ops nommu_dma_ops = { |
64 | .alloc_coherent = dma_generic_alloc_coherent, | 66 | .alloc_coherent = dma_generic_alloc_coherent, |
65 | .free_coherent = dma_generic_free_coherent, | 67 | .free_coherent = dma_generic_free_coherent, |
66 | .map_page = nommu_map_page, | 68 | .map_page = nommu_map_page, |
67 | .map_sg = nommu_map_sg, | 69 | .map_sg = nommu_map_sg, |
70 | #ifdef CONFIG_DMA_NONCOHERENT | ||
68 | .sync_single_for_device = nommu_sync_single, | 71 | .sync_single_for_device = nommu_sync_single, |
69 | .sync_sg_for_device = nommu_sync_sg, | 72 | .sync_sg_for_device = nommu_sync_sg, |
73 | #endif | ||
70 | .is_phys = 1, | 74 | .is_phys = 1, |
71 | }; | 75 | }; |
72 | 76 | ||