omap-iommu.h 880 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * omap iommu: simple virtual address space management
  4. *
  5. * Copyright (C) 2008-2009 Nokia Corporation
  6. *
  7. * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
  8. */
  9. #ifndef _OMAP_IOMMU_H_
  10. #define _OMAP_IOMMU_H_
  11. struct iommu_domain;
  12. #ifdef CONFIG_OMAP_IOMMU
  13. extern void omap_iommu_save_ctx(struct device *dev);
  14. extern void omap_iommu_restore_ctx(struct device *dev);
  15. int omap_iommu_domain_deactivate(struct iommu_domain *domain);
  16. int omap_iommu_domain_activate(struct iommu_domain *domain);
  17. #else
  18. static inline void omap_iommu_save_ctx(struct device *dev) {}
  19. static inline void omap_iommu_restore_ctx(struct device *dev) {}
  20. static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
  21. {
  22. return -ENODEV;
  23. }
  24. static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
  25. {
  26. return -ENODEV;
  27. }
  28. #endif
  29. #endif