OSDN Git Service

Merge tag 'msm-fix-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb...
authorOlof Johansson <olof@lixom.net>
Mon, 15 Apr 2013 03:53:45 +0000 (20:53 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 15 Apr 2013 03:53:53 +0000 (20:53 -0700)
From David Brown:
Some minor fixes for MSM for 3.10

  - Fix a timer problem that causes missed ticks and hangs.

  - Fix a problem with the decompressor UART dropping characters.

* tag 'msm-fix-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  ARM: msm: Fix uncompess.h tx underrun check
  ARM: msm: Stop counting before reprogramming clockevent

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

index fa97a10..9432487 100644 (file)
@@ -37,7 +37,7 @@ static void putc(int c)
         * Wait for TX_READY to be set; but skip it if we have a
         * TX underrun.
         */
-       if (UART_DM_SR & 0x08)
+       if (!(UART_DM_SR & 0x08))
                while (!(UART_DM_ISR & 0x80))
                        cpu_relax();
 
index 2969027..f9fd77e 100644 (file)
@@ -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;