blob: 3234fe9bba6e76196d8a852db8c26d078150d989 [file] [log] [blame]
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11001/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
Russell Kingab2c2152007-02-12 10:28:24 +00006#ifndef ASMARM_DEVICE_H
7#define ASMARM_DEVICE_H
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11008
Russell Kingab2c2152007-02-12 10:28:24 +00009struct dev_archdata {
10#ifdef CONFIG_DMABOUNCE
11 struct dmabounce_device_info *dmabounce;
12#endif
Ohad Ben-Cohencfb470b2011-10-13 12:53:18 +010013#ifdef CONFIG_IOMMU_API
14 void *iommu; /* private IOMMU data */
15#endif
Marek Szyprowski4ce63fc2012-05-16 15:48:21 +020016#ifdef CONFIG_ARM_DMA_USE_IOMMU
17 struct dma_iommu_mapping *mapping;
18#endif
Stefano Stabellinie0586322017-04-13 14:04:21 -070019#ifdef CONFIG_XEN
20 const struct dma_map_ops *dev_dma_ops;
21#endif
Laurent Pincharta93a1212017-05-27 19:17:43 +053022 unsigned int dma_coherent:1;
23 unsigned int dma_ops_setup:1;
Russell Kingab2c2152007-02-12 10:28:24 +000024};
25
Kevin Hilmanfbe01f52011-09-06 21:04:10 +010026struct omap_device;
27
Magnus Dammd7aacad2009-07-08 13:21:31 +020028struct pdev_archdata {
Kevin Hilmanfbe01f52011-09-06 21:04:10 +010029#ifdef CONFIG_ARCH_OMAP
30 struct omap_device *od;
31#endif
Magnus Dammd7aacad2009-07-08 13:21:31 +020032};
33
Hiroshi Doyufab112a2013-01-24 15:16:56 +020034#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 Kingab2c2152007-02-12 10:28:24 +000040#endif