Thomas Gleixner | 55716d2 | 2019-06-01 10:08:42 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 2 | /* |
| 3 | * Arch specific extensions to struct device |
Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 4 | */ |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 5 | #ifndef ASMARM_DEVICE_H |
| 6 | #define ASMARM_DEVICE_H |
Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 7 | |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 8 | struct dev_archdata { |
| 9 | #ifdef CONFIG_DMABOUNCE |
| 10 | struct dmabounce_device_info *dmabounce; |
| 11 | #endif |
Marek Szyprowski | 4ce63fc | 2012-05-16 15:48:21 +0200 | [diff] [blame] | 12 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 13 | struct dma_iommu_mapping *mapping; |
| 14 | #endif |
Laurent Pinchart | a93a121 | 2017-05-27 19:17:43 +0530 | [diff] [blame] | 15 | unsigned int dma_coherent:1; |
| 16 | unsigned int dma_ops_setup:1; |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 17 | }; |
| 18 | |
Kevin Hilman | fbe01f5 | 2011-09-06 21:04:10 +0100 | [diff] [blame] | 19 | struct omap_device; |
| 20 | |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 21 | struct pdev_archdata { |
Kevin Hilman | fbe01f5 | 2011-09-06 21:04:10 +0100 | [diff] [blame] | 22 | #ifdef CONFIG_ARCH_OMAP |
| 23 | struct omap_device *od; |
| 24 | #endif |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 25 | }; |
| 26 | |
Hiroshi Doyu | fab112a | 2013-01-24 15:16:56 +0200 | [diff] [blame] | 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 | |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 33 | #endif |