blob: 2c32ca09df02504447222d744d5459eaa2a3e9cb [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Tony Lindgrenc8d35c82012-11-02 12:24:03 -07002/*
3 * omap iommu: simple virtual address space management
4 *
5 * Copyright (C) 2008-2009 Nokia Corporation
6 *
7 * Written by Hiroshi DOYU <[email protected]>
Tony Lindgrenc8d35c82012-11-02 12:24:03 -07008 */
9
Laurent Pinchartbaaa7b5d2014-07-18 12:49:55 +020010#ifndef _OMAP_IOMMU_H_
11#define _OMAP_IOMMU_H_
Tony Lindgrenc8d35c82012-11-02 12:24:03 -070012
Suman Annad9c4d8a62019-08-07 11:26:50 +030013struct iommu_domain;
14
Mauro Carvalho Chehabc7f17702018-04-05 10:54:14 -040015#ifdef CONFIG_OMAP_IOMMU
Tony Lindgrenc8d35c82012-11-02 12:24:03 -070016extern void omap_iommu_save_ctx(struct device *dev);
17extern void omap_iommu_restore_ctx(struct device *dev);
Suman Annad9c4d8a62019-08-07 11:26:50 +030018
19int omap_iommu_domain_deactivate(struct iommu_domain *domain);
20int omap_iommu_domain_activate(struct iommu_domain *domain);
Mauro Carvalho Chehabc7f17702018-04-05 10:54:14 -040021#else
22static inline void omap_iommu_save_ctx(struct device *dev) {}
23static inline void omap_iommu_restore_ctx(struct device *dev) {}
Suman Annad9c4d8a62019-08-07 11:26:50 +030024
Joerg Roedel73499ad2019-08-09 18:09:13 +020025static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
26{
27 return -ENODEV;
28}
29
30static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
31{
32 return -ENODEV;
33}
Mauro Carvalho Chehabc7f17702018-04-05 10:54:14 -040034#endif
Tony Lindgrenc8d35c82012-11-02 12:24:03 -070035
36#endif