diff options
author | Cyril Chemparathy <cyril@ti.com> | 2012-09-19 19:51:17 -0400 |
---|---|---|
committer | Cyril Chemparathy <cyril@ti.com> | 2012-09-19 20:30:50 -0400 |
commit | adb8c3fae9ef7ee86707a0ff37b1d14ae2c3d4d8 (patch) | |
tree | 582d15e888e2d923f8c165bdefd9565994ae7392 | |
parent | 1c098bc9ddcdfebcbf1cb6dd17bcc5ee54bbc658 (diff) | |
download | linux-keystone-rebuild/01-upstream.tar.gz |
davinci: fix decompressor crash on non-uart platformsrebuild/01-upstream
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 18cfd4977155b..3a0ff905a69bb 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(); } |