Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * omap iommu: simple virtual address space management
0004  *
0005  * Copyright (C) 2008-2009 Nokia Corporation
0006  *
0007  * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
0008  */
0009 
0010 #ifndef _OMAP_IOMMU_H_
0011 #define _OMAP_IOMMU_H_
0012 
0013 struct iommu_domain;
0014 
0015 #ifdef CONFIG_OMAP_IOMMU
0016 extern void omap_iommu_save_ctx(struct device *dev);
0017 extern void omap_iommu_restore_ctx(struct device *dev);
0018 
0019 int omap_iommu_domain_deactivate(struct iommu_domain *domain);
0020 int omap_iommu_domain_activate(struct iommu_domain *domain);
0021 #else
0022 static inline void omap_iommu_save_ctx(struct device *dev) {}
0023 static inline void omap_iommu_restore_ctx(struct device *dev) {}
0024 
0025 static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
0026 {
0027     return -ENODEV;
0028 }
0029 
0030 static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
0031 {
0032     return -ENODEV;
0033 }
0034 #endif
0035 
0036 #endif