linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / asm-arm / arch-omap / uncompress.h
index aca0adf..c718264 100644 (file)
@@ -17,6 +17,7 @@
  * kind, whether express or implied.
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/serial_reg.h>
 #include <asm/arch/serial.h>
@@ -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';
+               }
+       }
 }
 
 /*