aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/omap-iommu.h
blob: 2c32ca09df02504447222d744d5459eaa2a3e9cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * omap iommu: simple virtual address space management
 *
 * Copyright (C) 2008-2009 Nokia Corporation
 *
 * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
 */

#ifndef _OMAP_IOMMU_H_
#define _OMAP_IOMMU_H_

struct iommu_domain;

#ifdef CONFIG_OMAP_IOMMU
extern void omap_iommu_save_ctx(struct device *dev);
extern void omap_iommu_restore_ctx(struct device *dev);

int omap_iommu_domain_deactivate(struct iommu_domain *domain);
int omap_iommu_domain_activate(struct iommu_domain *domain);
#else
static inline void omap_iommu_save_ctx(struct device *dev) {}
static inline void omap_iommu_restore_ctx(struct device *dev) {}

static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
{
	return -ENODEV;
}

static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
{
	return -ENODEV;
}
#endif

#endif