From 49db76eb5fd7d75babb4f3a5f30e86d1f8e82543 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 22 Nov 2007 17:57:30 +0100 Subject: [ARM] 4663/1: Only putc uncompressor output into FFUART if it was enabled by the bootloader Also, use existing register and bit definitions instead of numbers. Signed-off-by: Philipp Zabel Acked-by: Nicolas Pitre Signed-off-by: Russell King --- include/asm-arm/arch-pxa/uncompress.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/asm-arm/arch-pxa') diff --git a/include/asm-arm/arch-pxa/uncompress.h b/include/asm-arm/arch-pxa/uncompress.h index 178aa2e073a..3faad53a684 100644 --- a/include/asm-arm/arch-pxa/uncompress.h +++ b/include/asm-arm/arch-pxa/uncompress.h @@ -9,6 +9,9 @@ * published by the Free Software Foundation. */ +#include +#include + #define FFUART ((volatile unsigned long *)0x40100000) #define BTUART ((volatile unsigned long *)0x40200000) #define STUART ((volatile unsigned long *)0x40700000) @@ -19,9 +22,11 @@ static inline void putc(char c) { - while (!(UART[5] & 0x20)) + if (!(UART[UART_IER] & IER_UUE)) + return; + while (!(UART[UART_LSR] & LSR_TDRQ)) barrier(); - UART[0] = c; + UART[UART_TX] = c; } /* -- cgit v1.2.3