iommu/arm-smmu: Do a local halt around impl def programming
As per the hardware spec, the SMMU must be halted during programming of the implementation defined registers. Add the missing halt. Change-Id: Id28b546e5b5b646c263d7431a32f3c95ed3f2042 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
This commit is contained in:
parent
763858dfbc
commit
00e29d6f33
1 changed files with 5 additions and 0 deletions
|
@ -1663,14 +1663,19 @@ static void arm_smmu_domain_remove_master(struct arm_smmu_domain *smmu_domain,
|
||||||
arm_smmu_disable_clocks(smmu);
|
arm_smmu_disable_clocks(smmu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int arm_smmu_halt(struct arm_smmu_device *smmu);
|
||||||
|
static void arm_smmu_resume(struct arm_smmu_device *smmu);
|
||||||
|
|
||||||
static void arm_smmu_impl_def_programming(struct arm_smmu_device *smmu)
|
static void arm_smmu_impl_def_programming(struct arm_smmu_device *smmu)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct arm_smmu_impl_def_reg *regs = smmu->impl_def_attach_registers;
|
struct arm_smmu_impl_def_reg *regs = smmu->impl_def_attach_registers;
|
||||||
|
|
||||||
|
arm_smmu_halt(smmu);
|
||||||
for (i = 0; i < smmu->num_impl_def_attach_registers; ++i)
|
for (i = 0; i < smmu->num_impl_def_attach_registers; ++i)
|
||||||
writel_relaxed(regs[i].value,
|
writel_relaxed(regs[i].value,
|
||||||
ARM_SMMU_GR0(smmu) + regs[i].offset);
|
ARM_SMMU_GR0(smmu) + regs[i].offset);
|
||||||
|
arm_smmu_resume(smmu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arm_smmu_device_reset(struct arm_smmu_device *smmu);
|
static void arm_smmu_device_reset(struct arm_smmu_device *smmu);
|
||||||
|
|
Loading…
Add table
Reference in a new issue