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 { |
Marek Szyprowski | 2dc6a01 | 2012-02-10 19:55:20 +0100 | [diff] [blame] | 10 | struct dma_map_ops *dma_ops; |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 11 | #ifdef CONFIG_DMABOUNCE |
| 12 | struct dmabounce_device_info *dmabounce; |
| 13 | #endif |
Ohad Ben-Cohen | cfb470b | 2011-10-13 12:53:18 +0100 | [diff] [blame] | 14 | #ifdef CONFIG_IOMMU_API |
| 15 | void *iommu; /* private IOMMU data */ |
| 16 | #endif |
Marek Szyprowski | 4ce63fc | 2012-05-16 15:48:21 +0200 | [diff] [blame] | 17 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 18 | struct dma_iommu_mapping *mapping; |
| 19 | #endif |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 20 | }; |
| 21 | |
Kevin Hilman | fbe01f5 | 2011-09-06 21:04:10 +0100 | [diff] [blame] | 22 | struct omap_device; |
| 23 | |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 24 | struct pdev_archdata { |
Kevin Hilman | fbe01f5 | 2011-09-06 21:04:10 +0100 | [diff] [blame] | 25 | #ifdef CONFIG_ARCH_OMAP |
| 26 | struct omap_device *od; |
| 27 | #endif |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 28 | }; |
| 29 | |
Hiroshi Doyu | fab112a | 2013-01-24 15:16:56 +0200 | [diff] [blame] | 30 | #ifdef CONFIG_ARM_DMA_USE_IOMMU |
| 31 | #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping) |
| 32 | #else |
| 33 | #define to_dma_iommu_mapping(dev) NULL |
| 34 | #endif |
| 35 | |
Russell King | ab2c215 | 2007-02-12 10:28:24 +0000 | [diff] [blame] | 36 | #endif |