X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-arm%2Farch-imx%2Funcompress.h;fp=include%2Fasm-arm%2Farch-imx%2Funcompress.h;h=096077f2750b48a3a782f302070287743850e0a5;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=da333f69136f599cd7c0bd2645d654bd06dafd29;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/include/asm-arm/arch-imx/uncompress.h b/include/asm-arm/arch-imx/uncompress.h index da333f691..096077f27 100644 --- a/include/asm-arm/arch-imx/uncompress.h +++ b/include/asm-arm/arch-imx/uncompress.h @@ -39,7 +39,8 @@ * * This does not append a newline */ -static void putc(int c) +static void +putstr(const char *s) { unsigned long serial_port; @@ -53,14 +54,20 @@ static void putc(int c) return; } while(0); - while (!(UART(USR2) & USR2_TXFE)) - barrier(); + while (*s) { + while ( !(UART(USR2) & USR2_TXFE) ) + barrier(); - UART(TXR) = c; -} + UART(TXR) = *s; -static inline void flush(void) -{ + if (*s == '\n') { + while ( !(UART(USR2) & USR2_TXFE) ) + barrier(); + + UART(TXR) = '\r'; + } + s++; + } } /*