Commit 092c2ef4 authored by Doug Brown's avatar Doug Brown Committed by Thierry Reding

pwm: pxa: Use abrupt shutdown mode

Switch to abrupt shutdown mode in order to stop the clock as soon as
possible when PWM is disabled. This minimizes the possibility of the
clock being re-enabled while it is still in the process of turning off,
which will result in the clock ending up erroneously disabled.
Signed-off-by: default avatarDoug Brown <doug@schmorgal.com>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221113233639.24244-5-doug@schmorgal.comSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 939d002b
......@@ -85,7 +85,7 @@ static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
else
dc = mul_u64_u64_div_u64(pv + 1, duty_ns, period_ns);
writel(prescale, pc->mmio_base + offset + PWMCR);
writel(prescale | PWMCR_SD, pc->mmio_base + offset + PWMCR);
writel(dc, pc->mmio_base + offset + PWMDCR);
writel(pv, pc->mmio_base + offset + PWMPCR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment