diff options
-rw-r--r-- | arch/arm/plat-mxc/pwm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index ae34198a79dd..42dd17b89ff3 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -72,7 +72,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | |||
72 | 72 | ||
73 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); | 73 | writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR); |
74 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); | 74 | writel(period_cycles, pwm->mmio_base + MX3_PWMPR); |
75 | writel(MX3_PWMCR_PRESCALER(prescale - 1) | | 75 | writel(MX3_PWMCR_PRESCALER(prescale) | |
76 | MX3_PWMCR_CLKSRC_IPG_HIGH | MX3_PWMCR_EN, | 76 | MX3_PWMCR_CLKSRC_IPG_HIGH | MX3_PWMCR_EN, |
77 | pwm->mmio_base + MX3_PWMCR); | 77 | pwm->mmio_base + MX3_PWMCR); |
78 | } else if (cpu_is_mx1() || cpu_is_mx21()) { | 78 | } else if (cpu_is_mx1() || cpu_is_mx21()) { |
@@ -118,6 +118,8 @@ EXPORT_SYMBOL(pwm_enable); | |||
118 | 118 | ||
119 | void pwm_disable(struct pwm_device *pwm) | 119 | void pwm_disable(struct pwm_device *pwm) |
120 | { | 120 | { |
121 | writel(0, pwm->mmio_base + MX3_PWMCR); | ||
122 | |||
121 | if (pwm->clk_enabled) { | 123 | if (pwm->clk_enabled) { |
122 | clk_disable(pwm->clk); | 124 | clk_disable(pwm->clk); |
123 | pwm->clk_enabled = 0; | 125 | pwm->clk_enabled = 0; |