Message ID | 20180709135435.836-5-peter.maydell@linaro.org |
---|---|
State | New |
Headers | show |
Series | [PULL,01/11] hw/arm/smmu-common: Fix devfn computation in smmu_iommu_mr | expand |
diff --git a/hw/timer/cmsdk-apb-timer.c b/hw/timer/cmsdk-apb-timer.c index 1f99081db1a..3ebdc7be408 100644 --- a/hw/timer/cmsdk-apb-timer.c +++ b/hw/timer/cmsdk-apb-timer.c @@ -119,7 +119,7 @@ static void cmsdk_apb_timer_write(void *opaque, hwaddr offset, uint64_t value, } s->ctrl = value & 0xf; if (s->ctrl & R_CTRL_EN_MASK) { - ptimer_run(s->timer, 0); + ptimer_run(s->timer, ptimer_get_limit(s->timer) == 0); } else { ptimer_stop(s->timer); }