Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 1 | /* |
| 2 | * Arch specific extensions to struct device |
| 3 | * |
| 4 | * This file is released under the GPLv2 |
| 5 | */ |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 6 | #ifndef ASMARM_DEVICE_H |
| 7 | #define ASMARM_DEVICE_H |
Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 8 | |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 9 | struct dev_archdata { |
| 10 | #ifdef CONFIG_DMABOUNCE |
| 11 | struct dmabounce_device_info *dmabounce; |
| 12 | #endif |
Ohad Ben-Cohen | cfb470b | 2011-10-13 12:53:18 +0100 | [diff] [blame] | 13 | #ifdef CONFIG_IOMMU_API |
| 14 | void *iommu; /* private IOMMU data */ |
| 15 | #endif |
Marek Szyprowski | 4ce63fc | 2012-05-16 15:48:21 +0200 | [diff] [blame] | 16 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 17 | struct dma_iommu_mapping *mapping; |
| 18 | #endif |
Stefano Stabellini | e058632 | 2017-04-13 14:04:21 -0700 | [diff] [blame] | 19 | #ifdef CONFIG_XEN |
| 20 | const struct dma_map_ops *dev_dma_ops; |
| 21 | #endif |
Laurent Pinchart | a93a121 | 2017-05-27 19:17:43 +0530 | [diff] [blame^] | 22 | unsigned int dma_coherent:1; |
| 23 | unsigned int dma_ops_setup:1; |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 24 | }; |
| 25 | |
Kevin Hilman | fbe01f5 | 2011-09-06 21:04:10 +0100 | [diff] [blame] | 26 | struct omap_device; |
| 27 | |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 28 | struct pdev_archdata { |
Kevin Hilman | fbe01f5 | 2011-09-06 21:04:10 +0100 | [diff] [blame] | 29 | #ifdef CONFIG_ARCH_OMAP |
| 30 | struct omap_device *od; |
| 31 | #endif |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 32 | }; |
| 33 | |
Hiroshi Doyu | fab112a | 2013-01-24 15:16:56 +0200 | [diff] [blame] | 34 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 35 | #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping) |
| 36 | #else |
| 37 | #define to_dma_iommu_mapping(dev) NULL |
| 38 | #endif |
| 39 | |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 40 | #endif |