forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
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 |