blob: dc662fca9230d18c6617304c281cf227890342a9 [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 {
Marek Szyprowski2dc6a012012-02-10 19:55:20 +010010 struct dma_map_ops *dma_ops;
Russell Kingab2c2152007-02-12 10:28:24 +000011#ifdef CONFIG_DMABOUNCE
12 struct dmabounce_device_info *dmabounce;
13#endif
Ohad Ben-Cohencfb470b2011-10-13 12:53:18 +010014#ifdef CONFIG_IOMMU_API
15 void *iommu; /* private IOMMU data */
16#endif
Marek Szyprowski4ce63fc2012-05-16 15:48:21 +020017#ifdef CONFIG_ARM_DMA_USE_IOMMU
18 struct dma_iommu_mapping *mapping;
19#endif
Russell Kingab2c2152007-02-12 10:28:24 +000020};
21
Kevin Hilmanfbe01f52011-09-06 21:04:10 +010022struct omap_device;
23
Magnus Dammd7aacad2009-07-08 13:21:31 +020024struct pdev_archdata {
Kevin Hilmanfbe01f52011-09-06 21:04:10 +010025#ifdef CONFIG_ARCH_OMAP
26 struct omap_device *od;
27#endif
Magnus Dammd7aacad2009-07-08 13:21:31 +020028};
29
Hiroshi Doyufab112a2013-01-24 15:16:56 +020030#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 Kingab2c2152007-02-12 10:28:24 +000036#endif