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