diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2013-04-10 21:00:11 -0400 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2013-04-11 12:40:35 -0400 |
commit | 73a8c28f167c9e7bc42eafc0bcbd298031709430 (patch) | |
tree | 5b6a152c302c531d57a54cdb66405865c529b0ca /arch/arm/mach-msm | |
parent | 4080d2d11a2d572228c2b8d02406e997b87ba6a5 (diff) |
ARM: msm: Fix uncompess.h tx underrun check
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>
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r-- | arch/arm/mach-msm/include/mach/uncompress.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h index fa97a10d8695..94324870fb04 100644 --- a/arch/arm/mach-msm/include/mach/uncompress.h +++ b/arch/arm/mach-msm/include/mach/uncompress.h | |||
@@ -37,7 +37,7 @@ static void putc(int c) | |||
37 | * Wait for TX_READY to be set; but skip it if we have a | 37 | * Wait for TX_READY to be set; but skip it if we have a |
38 | * TX underrun. | 38 | * TX underrun. |
39 | */ | 39 | */ |
40 | if (UART_DM_SR & 0x08) | 40 | if (!(UART_DM_SR & 0x08)) |
41 | while (!(UART_DM_ISR & 0x80)) | 41 | while (!(UART_DM_ISR & 0x80)) |
42 | cpu_relax(); | 42 | cpu_relax(); |
43 | 43 | ||