[PATCH v2 2/3] iommu/rockchip: Fix the poll period and timeout of FORCE_RESET
Arun Iyengar via B4 Relay
devnull+aiyengar1990.gmail.com at kernel.org
Wed Dec 2 18:38:02 PST 2026
From: Arun Iyengar <aiyengar1990 at gmail.com>
rk_iommu_force_reset() passes the 100 ms timeout as the poll period and
the 1 ms poll timeout as the timeout. A reset that is not done at the
first read sleeps 25-100 ms, reads once more and gives up.
Poll every RK_MMU_POLL_PERIOD_US for up to RK_MMU_FORCE_RESET_TIMEOUT_US.
Fixes: 0416bf6479ac ("iommu/rockchip: Use iopoll helpers to wait for hardware")
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
---
drivers/iommu/rockchip-iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 1509b4527be9..103e1f957260 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -536,8 +536,8 @@ static int rk_iommu_force_reset(struct rk_iommu *iommu)
rk_iommu_command(iommu, RK_MMU_CMD_FORCE_RESET);
ret = readx_poll_timeout(rk_iommu_is_reset_done, iommu, val,
- val, RK_MMU_FORCE_RESET_TIMEOUT_US,
- RK_MMU_POLL_TIMEOUT_US);
+ val, RK_MMU_POLL_PERIOD_US,
+ RK_MMU_FORCE_RESET_TIMEOUT_US);
if (ret) {
dev_err(iommu->dev, "FORCE_RESET command timed out\n");
return ret;
--
2.55.0
More information about the linux-arm-kernel
mailing list