summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-08-02 14:21:39 +0300
committerTony Lindgren <tony@atomide.com>2010-08-02 14:21:39 +0300
commit35ddf7c003f54fc9878a15384beb9a900d40319d (patch)
tree045e4760c9e3ceed96ed659d2fe2d412415728b8 /arch/arm
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
omap: Add back UART MDR1 check into uncompress.h
Recent DEBUG_LL and uncompress.h changes removed the check_port() as pointed out by Cory Maccarrone <darkstar6262@gmail.com>. This causes some boards to not boot, so add back the MDR1 register check. The MDR1 register tells the mode of omap uart. Based on an earlier patch by Cory Maccarrone <darkstar6262@gmail.com>. Tested-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index bbedd71943f6..ddf723be48dc 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -25,6 +25,8 @@
#include <plat/serial.h>
+#define MDR1_MODE_MASK 0x07
+
static volatile u8 *uart_base;
static int uart_shift;
@@ -42,6 +44,10 @@ static void putc(int c)
if (!uart_base)
return;
+ /* Check for UART 16x mode */
+ if ((uart_base[UART_OMAP_MDR1 << uart_shift] & MDR1_MODE_MASK) != 0)
+ return;
+
while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
barrier();
uart_base[UART_TX << uart_shift] = c;