[PATCH 3/4] iommu/mediatek: Avoid access secure bank register in runtime_suspend
Yong Wu
yong.wu at mediatek.com
Sun Sep 10 18:17:50 PDT 2023
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 at mediatek.com>
---
drivers/iommu/mtk_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.25.1
More information about the Linux-mediatek
mailing list