diff options
author | Cyril Chemparathy <cyril@ti.com> | 2012-09-19 19:51:17 -0400 |
---|---|---|
committer | Cyril Chemparathy <cyril@ti.com> | 2012-09-21 10:44:20 -0400 |
commit | 7df20a57fd203b2409c8fbc8f7900b2d649d5b9a (patch) | |
tree | 1c13c35634dba419df62f886cf3b978d52f341df | |
parent | bb11673fea0d591342929a39686b0d8ca9df190a (diff) | |
download | linux-keystone-7df20a57fd203b2409c8fbc8f7900b2d649d5b9a.tar.gz |
davinci: fix decompressor crash on non-uart platforms
The decompressor debug macro definitions for davinci crash miserably on
platforms that do not have a UART defined. This is a problem for pure-DT
platforms such as TCI6614, where an early UART definition is unavailable in
the decompressor.
This patch makes the UART usage in the decompressor truly optional.
-rw-r--r-- | arch/arm/mach-davinci/include/mach/uncompress.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h index 18cfd4977155b4..3a0ff905a69bb9 100644 --- a/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/arch/arm/mach-davinci/include/mach/uncompress.h @@ -32,6 +32,9 @@ u32 *uart; /* PORT_16C550A, in polled non-fifo mode */ static void putc(char c) { + if (!uart) + return; + while (!(uart[UART_LSR] & UART_LSR_THRE)) barrier(); uart[UART_TX] = c; @@ -39,6 +42,9 @@ static void putc(char c) static inline void flush(void) { + if (!uart) + return; + while (!(uart[UART_LSR] & UART_LSR_THRE)) barrier(); } |