omap-iommu.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * omap iommu: simple virtual address space management
  3. *
  4. * Copyright (C) 2008-2009 Nokia Corporation
  5. *
  6. * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef _OMAP_IOMMU_H_
  13. #define _OMAP_IOMMU_H_
  14. struct iommu_domain;
  15. #ifdef CONFIG_OMAP_IOMMU
  16. extern void omap_iommu_save_ctx(struct device *dev);
  17. extern void omap_iommu_restore_ctx(struct device *dev);
  18. int omap_iommu_domain_deactivate(struct iommu_domain *domain);
  19. int omap_iommu_domain_activate(struct iommu_domain *domain);
  20. #else
  21. static inline void omap_iommu_save_ctx(struct device *dev) {}
  22. static inline void omap_iommu_restore_ctx(struct device *dev) {}
  23. static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
  24. {
  25. return -ENOTSUP;
  26. }
  27. static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
  28. {
  29. return -ENOTSUP;
  30. }
  31. #endif
  32. #endif