1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2c8d35c84STony Lindgren /* 3c8d35c84STony Lindgren * omap iommu: simple virtual address space management 4c8d35c84STony Lindgren * 5c8d35c84STony Lindgren * Copyright (C) 2008-2009 Nokia Corporation 6c8d35c84STony Lindgren * 7c8d35c84STony Lindgren * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com> 8c8d35c84STony Lindgren */ 9c8d35c84STony Lindgren 10baaa7b5dSLaurent Pinchart #ifndef _OMAP_IOMMU_H_ 11baaa7b5dSLaurent Pinchart #define _OMAP_IOMMU_H_ 12c8d35c84STony Lindgren 13d9c4d8a6SSuman Anna struct iommu_domain; 14d9c4d8a6SSuman Anna 15c7f1770fSMauro Carvalho Chehab #ifdef CONFIG_OMAP_IOMMU 16c8d35c84STony Lindgren extern void omap_iommu_save_ctx(struct device *dev); 17c8d35c84STony Lindgren extern void omap_iommu_restore_ctx(struct device *dev); 18d9c4d8a6SSuman Anna 19d9c4d8a6SSuman Anna int omap_iommu_domain_deactivate(struct iommu_domain *domain); 20d9c4d8a6SSuman Anna int omap_iommu_domain_activate(struct iommu_domain *domain); 21c7f1770fSMauro Carvalho Chehab #else omap_iommu_save_ctx(struct device * dev)22c7f1770fSMauro Carvalho Chehabstatic inline void omap_iommu_save_ctx(struct device *dev) {} omap_iommu_restore_ctx(struct device * dev)23c7f1770fSMauro Carvalho Chehabstatic inline void omap_iommu_restore_ctx(struct device *dev) {} 24d9c4d8a6SSuman Anna omap_iommu_domain_deactivate(struct iommu_domain * domain)2573499ad2SJoerg Roedelstatic inline int omap_iommu_domain_deactivate(struct iommu_domain *domain) 2673499ad2SJoerg Roedel { 2773499ad2SJoerg Roedel return -ENODEV; 2873499ad2SJoerg Roedel } 2973499ad2SJoerg Roedel omap_iommu_domain_activate(struct iommu_domain * domain)3073499ad2SJoerg Roedelstatic inline int omap_iommu_domain_activate(struct iommu_domain *domain) 3173499ad2SJoerg Roedel { 3273499ad2SJoerg Roedel return -ENODEV; 3373499ad2SJoerg Roedel } 34c7f1770fSMauro Carvalho Chehab #endif 35c8d35c84STony Lindgren 36c8d35c84STony Lindgren #endif 37