hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/iommu/arm/arm-smmu/qcom_iommu.c
....@@ -275,6 +275,13 @@
275275 ctx->secure_init = true;
276276 }
277277
278
+ /* Disable context bank before programming */
279
+ iommu_writel(ctx, ARM_SMMU_CB_SCTLR, 0);
280
+
281
+ /* Clear context bank fault address fault status registers */
282
+ iommu_writel(ctx, ARM_SMMU_CB_FAR, 0);
283
+ iommu_writel(ctx, ARM_SMMU_CB_FSR, ARM_SMMU_FSR_FAULT);
284
+
278285 /* TTBRs */
279286 iommu_writeq(ctx, ARM_SMMU_CB_TTBR0,
280287 pgtbl_cfg.arm_lpae_s1_cfg.ttbr |