diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-03-26 01:50:45 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-03-26 01:50:45 +0400 |
commit | 57f0d12ccb58b0d9328be1dc0ea9e7b538b84439 (patch) | |
tree | 2ae49ffecf3b52c8048b9b47a93a11a796e1c9cf /arch | |
parent | 8bb9660418e05bb1845ac1a2428444d78e322cc7 (diff) | |
parent | 4080d2d11a2d572228c2b8d02406e997b87ba6a5 (diff) | |
download | linux-57f0d12ccb58b0d9328be1dc0ea9e7b538b84439.tar.xz |
Merge tag 'msm-fix-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into fixes
From David Brown <davidb@codeaurora.org>:
This fix is intended for v3.9. It fixes a timer bug on MSM targets
that cause system hangs.
* tag 'msm-fix-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
ARM: msm: Stop counting before reprogramming clockevent
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-msm/timer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 2969027f02fa..f9fd77e8f1f5 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c @@ -62,7 +62,10 @@ static int msm_timer_set_next_event(unsigned long cycles, { u32 ctrl = readl_relaxed(event_base + TIMER_ENABLE); - writel_relaxed(0, event_base + TIMER_CLEAR); + ctrl &= ~TIMER_ENABLE_EN; + writel_relaxed(ctrl, event_base + TIMER_ENABLE); + + writel_relaxed(ctrl, event_base + TIMER_CLEAR); writel_relaxed(cycles, event_base + TIMER_MATCH_VAL); writel_relaxed(ctrl | TIMER_ENABLE_EN, event_base + TIMER_ENABLE); return 0; |