Drop the dma_direct_set_offset export and move the declaration to dma-map-ops.h now that the Allwinner drivers have stopped calling it.
Unified · Split
| @@ -8,7 +8,7 @@ · 7 unmodified lines | |||
| 8 | */ | 8 | */ |
| 9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
| 10 | #include <linux/of.h> | 10 | #include <linux/of.h> |
| 11 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-map-ops.h> |
| 12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
| 13 | #include <linux/of_platform.h> | 13 | #include <linux/of_platform.h> |
| 14 | #include <linux/of_address.h> | 14 | #include <linux/of_address.h> |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | |||
| 9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-map-ops.h> |
| 13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
| 14 | 14 | ||
| 15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
| @@ -12,7 +12,7 @@ · 11 unmodified lines | |||
| 12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
| 13 | #include <linux/async.h> | 13 | #include <linux/async.h> |
| 14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
| 15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-map-ops.h> |
| 16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
| 18 | #include <linux/sh_clk.h> | 18 | #include <linux/sh_clk.h> |
| @@ -11,7 +11,8 @@ · 10 unmodified lines | |||
| 11 | #include <linux/pci_ids.h> | 11 | #include <linux/pci_ids.h> |
| 12 | #include <linux/export.h> | 12 | #include <linux/export.h> |
| 13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 14 | #include <linux/dma-direct.h> | 14 | #include <linux/dma-map-ops.h> |
| 15 | #include <linux/swiotlb.h> | ||
| 15 | #include <asm/iommu.h> | 16 | #include <asm/iommu.h> |
| 16 | 17 | ||
| 17 | #define STA2X11_SWIOTLB_SIZE (4*1024*1024) | 18 | #define STA2X11_SWIOTLB_SIZE (4*1024*1024) |
| @@ -226,6 +226,9 @@ struct page *dma_alloc_from_pool(struct device *dev, size_t size, · 225 unmodified lines | |||
| 226 | bool (*phys_addr_ok)(struct device *, phys_addr_t, size_t)); | 226 | bool (*phys_addr_ok)(struct device *, phys_addr_t, size_t)); |
| 227 | bool dma_free_from_pool(struct device *dev, void *start, size_t size); | 227 | bool dma_free_from_pool(struct device *dev, void *start, size_t size); |
| 228 | 228 | ||
| 229 | int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start, | ||
| 230 | dma_addr_t dma_start, u64 size); | ||
| 231 | |||
| 229 | #ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H | 232 | #ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H |
| 230 | #include <asm/dma-coherence.h> | 233 | #include <asm/dma-coherence.h> |
| 231 | #elif defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ | 234 | #elif defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \ |
| @@ -558,13 +558,6 @@ static inline int dma_mmap_wc(struct device *dev, · 557 unmodified lines | |||
| 558 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 558 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
| 559 | #endif | 559 | #endif |
| 560 | 560 | ||
| 561 | /* | ||
| 562 | * Legacy interface to set up the dma offset map. Drivers really should not | ||
| 563 | * actually use it, but we have a few legacy cases left. | ||
| 564 | */ | ||
| 565 | int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start, | ||
| 566 | dma_addr_t dma_start, u64 size); | ||
| 567 | |||
| 568 | extern const struct dma_map_ops dma_virt_ops; | 561 | extern const struct dma_map_ops dma_virt_ops; |
| 569 | 562 | ||
| 570 | #endif /* _LINUX_DMA_MAPPING_H */ | 563 | #endif /* _LINUX_DMA_MAPPING_H */ |
| @@ -547,4 +547,3 @@ int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start, · 546 unmodified lines | |||
| 547 | dev->dma_range_map = map; | 547 | dev->dma_range_map = map; |
| 548 | return 0; | 548 | return 0; |
| 549 | } | 549 | } |
| 550 | EXPORT_SYMBOL_GPL(dma_direct_set_offset); | ||