Patchwork [2/3] hw/exynos4210_pwm.c: Fix STOP status in tick handler.

login
register
mail settings
Submitter Evgeny Voevodin
Date June 27, 2012, 3:55 a.m.
Message ID <1340769311-19692-3-git-send-email-e.voevodin@samsung.com>
Download mbox | patch
Permalink /patch/167495/
State New
Headers show

Comments

Evgeny Voevodin - June 27, 2012, 3:55 a.m.
START/STOP bit was not cleaned correctly.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
---
 hw/exynos4210_pwm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Peter Maydell - June 28, 2012, 5:15 p.m.
On 27 June 2012 04:55, Evgeny Voevodin <e.voevodin@samsung.com> wrote:
> START/STOP bit was not cleaned correctly.
>
> Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

Patch

diff --git a/hw/exynos4210_pwm.c b/hw/exynos4210_pwm.c
index 6243e59..0c22828 100644
--- a/hw/exynos4210_pwm.c
+++ b/hw/exynos4210_pwm.c
@@ -200,7 +200,7 @@  static void exynos4210_pwm_tick(void *opaque)
         ptimer_run(p->timer[id].ptimer, 1);
     } else {
         /* stop timer, set status to STOP, see Basic Timer Operation */
-        p->reg_tcon = ~TCON_TIMER_START(id);
+        p->reg_tcon &= ~TCON_TIMER_START(id);
         ptimer_stop(p->timer[id].ptimer);
     }
 }