Merge tag 'msm-core-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb...
authorOlof Johansson <olof@lixom.net>
Mon, 15 Apr 2013 03:49:21 +0000 (20:49 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 15 Apr 2013 03:49:28 +0000 (20:49 -0700)
From David Brown:
Patches for MSM core

These patches are changes to the MSM timer code that will be for
upcoming targets, including a generalization of the binding and
preventing a missing timer interrupt.

* tag 'msm-core-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  ARM: msm: Wait for timer clear to complete
  ARM: msm: Rework timer binding to be more general

Signed-off-by: Olof Johansson <olof@lixom.net>
1  2 
arch/arm/mach-msm/timer.c

index f9fd77e8f1f5a998af7b8f15e12af3afd5bcc299,b4b0d79476a85e02b24fa26405aff65f20ea3471..284313f3e02cb1edd56cfd25a425efe40a5207a1
@@@ -62,11 -65,13 +65,16 @@@ static int msm_timer_set_next_event(uns
  {
        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);
+       if (sts_base)
+               while (readl_relaxed(sts_base) & TIMER_STS_GPT0_CLR_PEND)
+                       cpu_relax();
        writel_relaxed(ctrl | TIMER_ENABLE_EN, event_base + TIMER_ENABLE);
        return 0;
  }