X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-arm%2Farch-omap%2Funcompress.h;fp=include%2Fasm-arm%2Farch-omap%2Funcompress.h;h=c718264affbd1fd7672faf887efb5fd6eb2164e6;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=aca0adfef1b8da878ca3a499fbfea14e0e98a2f0;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h index aca0adfef..c718264af 100644 --- a/include/asm-arm/arch-omap/uncompress.h +++ b/include/asm-arm/arch-omap/uncompress.h @@ -17,6 +17,7 @@ * kind, whether express or implied. */ +#include #include #include #include @@ -29,7 +30,8 @@ unsigned int system_rev; #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0) #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK -static void putc(int c) +static void +putstr(const char *s) { volatile u8 * uart = 0; int shift = 2; @@ -67,13 +69,16 @@ static void putc(int c) /* * Now, xmit each character */ - while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) - barrier(); - uart[UART_TX << shift] = c; -} - -static inline void flush(void) -{ + while (*s) { + while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) + barrier(); + uart[UART_TX << shift] = *s; + if (*s++ == '\n') { + while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) + barrier(); + uart[UART_TX << shift] = '\r'; + } + } } /*