blob: be666f58bf7ae37135a556f91a2bd0523c3fe29b [file] [log] [blame]
Thomas Gleixner55716d22019-06-01 10:08:42 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11002/*
3 * Arch specific extensions to struct device
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11004 */
Russell Kingab2c2152007-02-12 10:28:24 +00005#ifndef ASMARM_DEVICE_H
6#define ASMARM_DEVICE_H
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11007
Russell Kingab2c2152007-02-12 10:28:24 +00008struct dev_archdata {
9#ifdef CONFIG_DMABOUNCE
10 struct dmabounce_device_info *dmabounce;
11#endif
Marek Szyprowski4ce63fc2012-05-16 15:48:21 +020012#ifdef CONFIG_ARM_DMA_USE_IOMMU
13 struct dma_iommu_mapping *mapping;
14#endif
Laurent Pincharta93a1212017-05-27 19:17:43 +053015 unsigned int dma_coherent:1;
16 unsigned int dma_ops_setup:1;
Russell Kingab2c2152007-02-12 10:28:24 +000017};
18
Kevin Hilmanfbe01f52011-09-06 21:04:10 +010019struct omap_device;
20
Magnus Dammd7aacad2009-07-08 13:21:31 +020021struct pdev_archdata {
Kevin Hilmanfbe01f52011-09-06 21:04:10 +010022#ifdef CONFIG_ARCH_OMAP
23 struct omap_device *od;
24#endif
Magnus Dammd7aacad2009-07-08 13:21:31 +020025};
26
Hiroshi Doyufab112a2013-01-24 15:16:56 +020027#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 Kingab2c2152007-02-12 10:28:24 +000033#endif