mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
d9c4d8a6cc
This patch adds the support for the OMAP IOMMUs to be suspended during the auto suspend/resume of the OMAP remoteproc devices. The remote processors are auto suspended after a certain time of idle or inactivity period. This is done by introducing two new API, omap_iommu_domain_deactivate() and omap_iommu_domain_activate() to allow the client users/master devices of the IOMMU devices to deactivate & activate the IOMMU devices from their runtime suspend/resume operations. There is no API exposed by the IOMMU layer at present, and so these new API are added directly in the OMAP IOMMU driver to minimize framework changes. The API simply decrements and increments the runtime usage count of the IOMMU devices and let the context be saved/restored using the existing runtime pm callbacks. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
29 lines
843 B
C
29 lines
843 B
C
/* 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) {}
|
|
static inline int omap_iommu_domain_activate(struct iommu_domain *domain) {}
|
|
#endif
|
|
|
|
#endif
|