Index: sys/arm64/iommu/smmu.c =================================================================== --- sys/arm64/iommu/smmu.c +++ sys/arm64/iommu/smmu.c @@ -138,6 +138,8 @@ #define SMMU_Q_ALIGN (64 * 1024) +#define SMMU_POLL_TIMEOUT_US 1000000 + static struct resource_spec smmu_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -279,7 +281,7 @@ uint32_t v; int timeout; - timeout = 100000; + timeout = SMMU_POLL_TIMEOUT_US; bus_write_4(sc->res[0], reg, val); @@ -287,6 +289,7 @@ v = bus_read_4(sc->res[0], reg_ack); if (v == val) break; + DELAY(1); } while (timeout--); if (timeout <= 0) {