summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Hunt <hunt@ti.com>2012-07-21 13:32:54 -0500
committerAndy Green <andy.green@linaro.org>2012-09-07 13:06:40 +0800
commit94247b12b95c5a7155b1f53a8adcc5cfb92a54c9 (patch)
treed5ee13227c150b5d803b140a83a83d2f60f77b94 /include
parent492843045f090db8057361e29b5241dce8361889 (diff)
iommu: add iommu_domain_activate and iommu_domain_idle functions
The MMUs associated with processors can reside in different power domains, and may need the context to be saved when the associated power domain is being put into OFF state. Two new functions, iommu_domain_activate and iommu_domain_idle have been added to the iommu domain, and call into the individual drivers through a corresponding iommu_ops function. These functions allow the individual driver implementations to perform the necessary operations to preserve and restore the context of the iommu devices. Signed-off-by: Paul Hunt <hunt@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iommu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index eb72d3b890e9..0f3f36f4420c 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -55,6 +55,8 @@ struct iommu_domain {
* @domain_destroy: destroy iommu domain
* @attach_dev: attach device to an iommu domain
* @detach_dev: detach device from an iommu domain
+ * @domain_activate: enable iommu pm domain and restore configuration registers
+ * @domain_idle: save iommu configuration registers and idle pm domain
* @map: map a physically contiguous memory region to an iommu domain
* @unmap: unmap a physically contiguous memory region from an iommu domain
* @iova_to_phys: translate iova to physical address
@@ -67,6 +69,8 @@ struct iommu_ops {
void (*domain_destroy)(struct iommu_domain *domain);
int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
+ void (*domain_activate)(struct iommu_domain *domain);
+ void (*domain_idle)(struct iommu_domain *domain);
int (*map)(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot);
size_t (*unmap)(struct iommu_domain *domain, unsigned long iova,
@@ -87,6 +91,8 @@ extern int iommu_attach_device(struct iommu_domain *domain,
struct device *dev);
extern void iommu_detach_device(struct iommu_domain *domain,
struct device *dev);
+extern void iommu_domain_activate(struct iommu_domain *domain);
+extern void iommu_domain_idle(struct iommu_domain *domain);
extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot);
extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova,