xref: /linux/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_iommu.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2015 Samsung Electronics Co.Ltd
4  * Authors: Marek Szyprowski <m.szyprowski@samsung.com>
5  */
6 
7 #ifndef S5P_MFC_IOMMU_H_
8 #define S5P_MFC_IOMMU_H_
9 
10 #if defined(CONFIG_EXYNOS_IOMMU)
11 
12 #include <linux/iommu.h>
13 
14 static inline bool exynos_is_iommu_available(struct device *dev)
15 {
16 	return dev_iommu_priv_get(dev) != NULL;
17 }
18 
19 #else
20 
21 static inline bool exynos_is_iommu_available(struct device *dev)
22 {
23 	return false;
24 }
25 
26 #endif
27 
28 #endif /* S5P_MFC_IOMMU_H_ */
29