]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: msm: Fix uncompess.h tx underrun check
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 11 Apr 2013 01:00:11 +0000 (18:00 -0700)
committerDavid Brown <davidb@codeaurora.org>
Thu, 11 Apr 2013 16:40:35 +0000 (09:40 -0700)
Bit 3 of the SR register is set if there is a tx underrun. If
this bit isn't set, we should loop on the tx ready bit until we
can transmit again. Otherwise we should skip the loop and
transmit immediately. The code is doing the opposite though,
checking for an underrun and then looping on the tx ready bit
causing us to never loop on the tx read bit when the tx buffer
may not be ready.

This doesn't seem to affect my 8960 device too often, but in some
cases I see a lost character or two from the decompressor prints.
This also matches what we do in the assembly in debug-macro.S.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
arch/arm/mach-msm/include/mach/uncompress.h

index fa97a10d86951a565381e5457c379cb9d8ef08e2..94324870fb04ad19ff60cc43bd23dbcdcaf37ca8 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();