blob: c675bc0d5aa886b130f96ba8488e7e6360540a4c [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Arch specific extensions to struct device
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5#ifndef ASMARM_DEVICE_H
6#define ASMARM_DEVICE_H
7
8struct dev_archdata {
9#ifdef CONFIG_DMABOUNCE
10 struct dmabounce_device_info *dmabounce;
11#endif
12#ifdef CONFIG_IOMMU_API
13 void *iommu; /* private IOMMU data */
14#endif
15#ifdef CONFIG_ARM_DMA_USE_IOMMU
16 struct dma_iommu_mapping *mapping;
17#endif
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000018 unsigned int dma_coherent:1;
19 unsigned int dma_ops_setup:1;
20};
21
22struct omap_device;
23
24struct pdev_archdata {
25#ifdef CONFIG_ARCH_OMAP
26 struct omap_device *od;
27#endif
28};
29
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
36#endif