iommu/arm-smmu: Check for static-cb option before requesting TZ

We want to request TZ to change page table format
for non secure context banks only if static-cb
option is enabled. If the option is disabled then
programming of global registers would be done by
HLOS itself and we need not request TZ to change
page table format.

Change-Id: Id2228e6d2ec835e169d679296760256ce0524050
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
This commit is contained in:
Susheel Khiani 2016-02-22 10:46:46 +05:30 committed by David Keitel
parent 20a5dc1e2f
commit 2d6a28e2e3

View file

@ -1384,7 +1384,8 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain,
*/
#ifdef CONFIG_64BIT
reg = CBA2R_RW64_64BIT;
if (!arm_smmu_has_secure_vmid(smmu_domain))
if (!arm_smmu_has_secure_vmid(smmu_domain) &&
arm_smmu_is_static_cb(smmu))
msm_tz_set_cb_format(smmu->sec_id, cfg->cbndx);
#else
reg = CBA2R_RW64_32BIT;