diff options
author | Doug Brown <[email protected]> | 2022-12-02 19:35:23 +0100 |
---|---|---|
committer | Thierry Reding <[email protected]> | 2022-12-06 12:46:14 +0100 |
commit | 092c2ef4571cbc7e5f466bc241ff054723c41973 (patch) | |
tree | 5da469a1d113f04cd26dddc09133fb264a1dec2d /drivers/pwm/pwm-pxa.c | |
parent | 939d002b7501128640aaeffe175d6331dcce2ca6 (diff) |
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: Doug Brown <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-pxa.c')
-rw-r--r-- | drivers/pwm/pwm-pxa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index cf4d22c91929..00063ead7c0a 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -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); |