diff options
Diffstat (limited to 'arch/sh/mm/consistent.c')
-rw-r--r-- | arch/sh/mm/consistent.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 64b8f7f96f9a..9f8ea3ada4db 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -16,14 +16,6 @@ | |||
16 | #include <asm/addrspace.h> | 16 | #include <asm/addrspace.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | 18 | ||
19 | struct dma_coherent_mem { | ||
20 | void *virt_base; | ||
21 | u32 device_base; | ||
22 | int size; | ||
23 | int flags; | ||
24 | unsigned long *bitmap; | ||
25 | }; | ||
26 | |||
27 | void *dma_alloc_coherent(struct device *dev, size_t size, | 19 | void *dma_alloc_coherent(struct device *dev, size_t size, |
28 | dma_addr_t *dma_handle, gfp_t gfp) | 20 | dma_addr_t *dma_handle, gfp_t gfp) |
29 | { | 21 | { |
@@ -44,7 +36,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size, | |||
44 | */ | 36 | */ |
45 | dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL); | 37 | dma_cache_sync(dev, ret, size, DMA_BIDIRECTIONAL); |
46 | 38 | ||
47 | ret_nocache = ioremap_nocache(virt_to_phys(ret), size); | 39 | ret_nocache = (void __force *)ioremap_nocache(virt_to_phys(ret), size); |
48 | if (!ret_nocache) { | 40 | if (!ret_nocache) { |
49 | free_pages((unsigned long)ret, order); | 41 | free_pages((unsigned long)ret, order); |
50 | return NULL; | 42 | return NULL; |
@@ -58,12 +50,10 @@ EXPORT_SYMBOL(dma_alloc_coherent); | |||
58 | void dma_free_coherent(struct device *dev, size_t size, | 50 | void dma_free_coherent(struct device *dev, size_t size, |
59 | void *vaddr, dma_addr_t dma_handle) | 51 | void *vaddr, dma_addr_t dma_handle) |
60 | { | 52 | { |
61 | struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; | ||
62 | int order = get_order(size); | 53 | int order = get_order(size); |
63 | 54 | ||
64 | if (!dma_release_from_coherent(dev, order, vaddr)) { | 55 | if (!dma_release_from_coherent(dev, order, vaddr)) { |
65 | WARN_ON(irqs_disabled()); /* for portability */ | 56 | WARN_ON(irqs_disabled()); /* for portability */ |
66 | BUG_ON(mem && mem->flags & DMA_MEMORY_EXCLUSIVE); | ||
67 | free_pages((unsigned long)phys_to_virt(dma_handle), order); | 57 | free_pages((unsigned long)phys_to_virt(dma_handle), order); |
68 | iounmap(vaddr); | 58 | iounmap(vaddr); |
69 | } | 59 | } |