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

Commit 8f1c7517 authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

iommu/arm-smmu: Implement {enable,disable}_config_clocks



Some of our users need to be able to call
iommu_{enable,disable}_config_clocks on domains for SMMUs that we
control.  Implement them.

CRs-Fixed: 997751
Change-Id: Idc3692679409093faf8f458d53326e669d7f6479
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent e5693ae8
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1021,6 +1021,20 @@ static void arm_smmu_tlbi_domain(struct iommu_domain *domain)
	arm_smmu_tlb_inv_context(domain->priv);
}

static int arm_smmu_enable_config_clocks(struct iommu_domain *domain)
{
	struct arm_smmu_domain *smmu_domain = domain->priv;

	return arm_smmu_enable_clocks(smmu_domain->smmu);
}

static void arm_smmu_disable_config_clocks(struct iommu_domain *domain)
{
	struct arm_smmu_domain *smmu_domain = domain->priv;

	arm_smmu_disable_clocks(smmu_domain->smmu);
}

struct arm_smmu_secure_pool_chunk {
	void *addr;
	size_t size;
@@ -3085,6 +3099,8 @@ static struct iommu_ops arm_smmu_ops = {
	.reg_read		= arm_smmu_reg_read,
	.reg_write		= arm_smmu_reg_write,
	.tlbi_domain		= arm_smmu_tlbi_domain,
	.enable_config_clocks	= arm_smmu_enable_config_clocks,
	.disable_config_clocks	= arm_smmu_disable_config_clocks,
};

static void arm_smmu_device_reset(struct arm_smmu_device *smmu)