Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99e7cd32 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Gerrit - the friendly Code Review server
Browse files

iommu/arm-smmu: pass CB index for smmu programming by TZ



As required, pass Context bank index as an argument to TZ
interface, used to initialize smmu.

Change-Id: I088fecd54b45866a67c4cb44dd76b16d81ab7664
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 6162f3a0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -440,7 +440,7 @@ static bool is_dynamic_domain(struct iommu_domain *domain)
	return !!(smmu_domain->attributes & (1 << DOMAIN_ATTR_DYNAMIC));
}

static int arm_smmu_restore_sec_cfg(struct arm_smmu_device *smmu)
static int arm_smmu_restore_sec_cfg(struct arm_smmu_device *smmu, u32 cb)
{
	int ret;
	int scm_ret = 0;
@@ -448,7 +448,7 @@ static int arm_smmu_restore_sec_cfg(struct arm_smmu_device *smmu)
	if (!arm_smmu_is_static_cb(smmu))
		return 0;

	ret = scm_restore_sec_cfg(smmu->sec_id, 0x0, &scm_ret);
	ret = scm_restore_sec_cfg(smmu->sec_id, cb, &scm_ret);
	if (ret || scm_ret) {
		pr_err("scm call IOMMU_SECURE_CFG failed\n");
		return -EINVAL;
@@ -3990,7 +3990,7 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
	bool cttw_reg, cttw_fw = smmu->features & ARM_SMMU_FEAT_COHERENT_WALK;
	int i;

	if (arm_smmu_restore_sec_cfg(smmu))
	if (arm_smmu_restore_sec_cfg(smmu, 0))
		return -ENODEV;

	dev_dbg(smmu->dev, "probing hardware configuration...\n");