David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Arch specific extensions to struct device |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 4 | */ |
| 5 | #ifndef ASMARM_DEVICE_H |
| 6 | #define ASMARM_DEVICE_H |
| 7 | |
| 8 | struct dev_archdata { |
| 9 | #ifdef CONFIG_DMABOUNCE |
| 10 | struct dmabounce_device_info *dmabounce; |
| 11 | #endif |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 12 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 13 | struct dma_iommu_mapping *mapping; |
| 14 | #endif |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 15 | unsigned int dma_coherent:1; |
| 16 | unsigned int dma_ops_setup:1; |
| 17 | }; |
| 18 | |
| 19 | struct omap_device; |
| 20 | |
| 21 | struct pdev_archdata { |
| 22 | #ifdef CONFIG_ARCH_OMAP |
| 23 | struct omap_device *od; |
| 24 | #endif |
| 25 | }; |
| 26 | |
| 27 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 28 | #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping) |
| 29 | #else |
| 30 | #define to_dma_iommu_mapping(dev) NULL |
| 31 | #endif |
| 32 | |
| 33 | #endif |