The MICRO_MMU_CTRL register is used for halt control, but it also
contains some important configuration bits. Currently, when we request
a halt, we're wiping out all of the other bits in the register, losing
any previous configuration. Fix this by reading the value and OR'ing in
the bits we need.
Change-Id: Iafdc5b2a344916dce9bac7f958a153dbee042ca8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
static int __arm_smmu_halt(struct arm_smmu_device *smmu, bool wait)
{
+ u32 reg;
void __iomem *impl_def1_base = ARM_SMMU_IMPL_DEF1(smmu);
- writel_relaxed(MICRO_MMU_CTRL_LOCAL_HALT_REQ,
- impl_def1_base + IMPL_DEF1_MICRO_MMU_CTRL);
+ reg = readl_relaxed(impl_def1_base + IMPL_DEF1_MICRO_MMU_CTRL);
+ reg |= MICRO_MMU_CTRL_LOCAL_HALT_REQ;
+ writel_relaxed(reg, impl_def1_base + IMPL_DEF1_MICRO_MMU_CTRL);
return wait ? arm_smmu_wait_for_halt(smmu) : 0;
}