iommu: msm: Only program registers once
Certain operations need to be performed only once per
IOMMU. Ensure that this is the case for both secure and non-secure
IOMMUs.
Change-Id: If16220fc5807a55daadd1c5e13a1117148445e0c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
diff --git a/arch/arm/mach-msm/include/mach/iommu.h b/arch/arm/mach-msm/include/mach/iommu.h
index 923e4da..c5c4988 100644
--- a/arch/arm/mach-msm/include/mach/iommu.h
+++ b/arch/arm/mach-msm/include/mach/iommu.h
@@ -97,6 +97,7 @@
* @clk_reg_virt: Optional clock register virtual address.
* @halt_enabled: Set to 1 if IOMMU halt is supported in the IOMMU, 0 otherwise.
* @asid: List of ASID and their usage count (index is ASID value).
+ * @ctx_attach_count: Count of how many context are attached.
*
* A msm_iommu_drvdata holds the global driver data about a single piece
* of an IOMMU hardware instance.
@@ -119,6 +120,7 @@
void __iomem *clk_reg_virt;
int halt_enabled;
int *asid;
+ unsigned int ctx_attach_count;
};
void msm_iommu_add_drv(struct msm_iommu_drvdata *drv);