summaryrefslogtreecommitdiff
path: root/drivers
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 /drivers
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 'drivers')
-rw-r--r--drivers/iommu/iommu.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 8b9ded88e6f5..fe1ae51e0f14 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -192,6 +192,20 @@ void iommu_detach_device(struct iommu_domain *domain, struct device *dev)
}
EXPORT_SYMBOL_GPL(iommu_detach_device);
+void iommu_domain_activate(struct iommu_domain *domain)
+{
+ if (likely(domain->ops->domain_activate != NULL))
+ domain->ops->domain_activate(domain);
+}
+EXPORT_SYMBOL_GPL(iommu_domain_activate);
+
+void iommu_domain_idle(struct iommu_domain *domain)
+{
+ if (likely(domain->ops->domain_idle != NULL))
+ domain->ops->domain_idle(domain);
+}
+EXPORT_SYMBOL_GPL(iommu_domain_idle);
+
phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
unsigned long iova)
{