aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm/device.h')
-rw-r--r--arch/arm64/include/asm/device.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/device.h b/arch/arm64/include/asm/device.h
index 243ef256b8c9..908a6a53ed49 100644
--- a/arch/arm64/include/asm/device.h
+++ b/arch/arm64/include/asm/device.h
@@ -22,9 +22,18 @@ struct dev_archdata {
void *iommu; /* private IOMMU data */
#endif
bool dma_coherent;
+#ifdef CONFIG_ARM64_DMA_USE_IOMMU
+ struct dma_iommu_mapping *mapping;
+#endif
};
struct pdev_archdata {
};
+#ifdef CONFIG_ARM64_DMA_USE_IOMMU
+#define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
+#else
+#define to_dma_iommu_mapping(dev) NULL
+#endif
+
#endif