Message ID | 20230911011751.29906-4-yong.wu@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] iommu/mediatek: Initialise the secure bank | expand |
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index e1faf2339b9a..24d7f5138f7b 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1473,7 +1473,7 @@ static int __maybe_unused mtk_iommu_runtime_suspend(struct device *dev) reg->ctrl_reg = readl_relaxed(base + REG_MMU_CTRL_REG); reg->vld_pa_rng = readl_relaxed(base + REG_MMU_VLD_PA_RNG); do { - if (!data->plat_data->banks_enable[i]) + if (!data->plat_data->banks_enable[i] || data->bank[i].is_secure) continue; base = data->bank[i].base; reg->int_control[i] = readl_relaxed(base + REG_MMU_INT_CONTROL0);
The secure bank registers are protected and they can only be accessed in secure world. Avoid access them in runtime_suspend. For secure bank, the m4u_dom always is NULL, thus we don't need add this checking in runtime_resume. Signed-off-by: Yong Wu <yong.wu@mediatek.com> --- drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)